Mercurial > hg > th-libs
diff Makefile.common @ 782:94e8e6ad8c9e
Rename Makefile.gen to Makefile.common
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 03 Aug 2023 09:04:43 +0300 |
parents | Makefile.gen@ac9895c6b056 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.common Thu Aug 03 09:04:43 2023 +0300 @@ -0,0 +1,41 @@ +### +### Compiler flags and paths +### +CFLAGS += -W -Wall -Wextra -D_XOPEN_SOURCE=500 -I./ +CFLAGS += -std=c11 -pedantic +CFLAGS += -g +CFLAGS += -O2 +CFLAGS += -DTH_USE_INTERNAL_SPRINTF=1 +CFLAGS += -DTH_PRINTF_DEBUG=1 +CFLAGS += -DTH_USE_OPT_ARG=1 +#CFLAGS += -DTH_EXPERIMENTAL_REGEX=1 +#CFLAGS += -DTH_EXPERIMENTAL_REGEX_DEBUG=1 + +THLIBS = ./ + +### +### Objects and binaries +### +THLIBS_A=$(OBJPATH)thlibs.a +THLIBS_OBJ=th_util.o th_config.o th_string.o th_args.o \ + th_crypto.o th_datastruct.o th_network.o th_file.o \ + th_ioctx.o th_ioctx_stdio.o th_ioctx_mem.o th_regex.o + + +TESTS_OBJ=tests.o +TESTS_BIN=$(BINPATH)tests$(BINEXT) + +TARGETS += $(TESTS_BIN) + +include $(THLIBS)/Makefile.inc + + +### +### Extra targets +### +$(TESTS_BIN): $(addprefix $(OBJPATH),$(TESTS_OBJ)) $(THLIBS_A) + $(LINK_C_BIN) + +check: $(TESTS_BIN) + $(TESTS_BIN) -v +