view Makefile.gen @ 631:d5221299656a

Add new function th_ringbuf_init() and add "allocated" field to th_ringbuf_t to flag if the structure itself has been allocated by th_ringbuf_new() or not. Free structure in th_ringbuf_free() only if allocated flag is set.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 17 Jan 2020 20:07:25 +0200
parents afcaf5e38f56
children d191ded8a790
line wrap: on
line source

###
### Compiler flags and paths
###
CFLAGS += -W -Wall -Wextra -D_XOPEN_SOURCE=500 -I./
CFLAGS += -std=c99 -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

THLIBS  = ./

###
### Objects and binaries
###
THLIBS_A=$(OBJPATH)thlibs.a
THLIBS_OBJ=th_util.o th_config.o th_string.o th_ioctx.o \
	th_args.o th_crypto.o th_datastruct.o th_network.o \
	th_file.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