annotate Makefile.gen @ 678:7e207f1023d9

Split stdio and memio stuff to separate files from th_stdio.c
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 29 Feb 2020 12:19:02 +0200
parents d191ded8a790
children ac9895c6b056
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
601
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
1 ###
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
2 ### Compiler flags and paths
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
3 ###
426
56874ab723d3 Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents: 419
diff changeset
4 CFLAGS += -W -Wall -Wextra -D_XOPEN_SOURCE=500 -I./
564
a1dac9eb3f06 Typecast to void* to silence a silly clang-9 warning.
Matti Hamalainen <ccr@tnsp.org>
parents: 562
diff changeset
5 CFLAGS += -std=c99 -pedantic
406
30432a52026a Adjust build flags.
Matti Hamalainen <ccr@tnsp.org>
parents: 382
diff changeset
6 CFLAGS += -g
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 CFLAGS += -O2
426
56874ab723d3 Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents: 419
diff changeset
8 CFLAGS += -DTH_USE_INTERNAL_SPRINTF=1
406
30432a52026a Adjust build flags.
Matti Hamalainen <ccr@tnsp.org>
parents: 382
diff changeset
9 CFLAGS += -DTH_PRINTF_DEBUG=1
587
98812eb78d8e Add new compile-time optional th_optarg struct field o_arg for specifying the option argument description/name. TH_USE_OPT_ARG must be defined at compile time.
Matti Hamalainen <ccr@tnsp.org>
parents: 564
diff changeset
10 CFLAGS += -DTH_USE_OPT_ARG=1
614
afcaf5e38f56 Disable regex stuff from normal builds.
Matti Hamalainen <ccr@tnsp.org>
parents: 605
diff changeset
11 #CFLAGS += -DTH_EXPERIMENTAL_REGEX=1
635
d191ded8a790 Improve the experimental regex matching debugging macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 614
diff changeset
12 #CFLAGS += -DTH_EXPERIMENTAL_REGEX_DEBUG=1
426
56874ab723d3 Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents: 419
diff changeset
13
406
30432a52026a Adjust build flags.
Matti Hamalainen <ccr@tnsp.org>
parents: 382
diff changeset
14 THLIBS = ./
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
601
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
16 ###
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
17 ### Objects and binaries
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
18 ###
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 THLIBS_A=$(OBJPATH)thlibs.a
678
7e207f1023d9 Split stdio and memio stuff to separate files from th_stdio.c
Matti Hamalainen <ccr@tnsp.org>
parents: 635
diff changeset
20 THLIBS_OBJ=th_util.o th_config.o th_string.o th_args.o \
7e207f1023d9 Split stdio and memio stuff to separate files from th_stdio.c
Matti Hamalainen <ccr@tnsp.org>
parents: 635
diff changeset
21 th_crypto.o th_datastruct.o th_network.o th_file.o \
7e207f1023d9 Split stdio and memio stuff to separate files from th_stdio.c
Matti Hamalainen <ccr@tnsp.org>
parents: 635
diff changeset
22 th_ioctx.o th_ioctx_stdio.o th_ioctx_mem.o th_regex.o
273
7bea1d5ab944 Build all modules.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
23
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 TESTS_OBJ=tests.o
562
5d2c1bfc04aa Rename EXEEXT to BINEXT in the build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 476
diff changeset
26 TESTS_BIN=$(BINPATH)tests$(BINEXT)
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 TARGETS += $(TESTS_BIN)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29
433
0a2f32b8a26e Improve the build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 426
diff changeset
30 include $(THLIBS)/Makefile.inc
0a2f32b8a26e Improve the build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 426
diff changeset
31
601
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
32
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
33 ###
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
34 ### Extra targets
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
35 ###
302
3f05f6fb5dfd Fix build.
Matti Hamalainen <ccr@tnsp.org>
parents: 294
diff changeset
36 $(TESTS_BIN): $(addprefix $(OBJPATH),$(TESTS_OBJ)) $(THLIBS_A)
601
3851e00bcd71 Fix building of 'tests'.
Matti Hamalainen <ccr@tnsp.org>
parents: 587
diff changeset
37 $(LINK_C_BIN)
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
292
54032f17c7e5 Add 'make check' target.
Matti Hamalainen <ccr@tnsp.org>
parents: 273
diff changeset
39 check: $(TESTS_BIN)
54032f17c7e5 Add 'make check' target.
Matti Hamalainen <ccr@tnsp.org>
parents: 273
diff changeset
40 $(TESTS_BIN) -v
54032f17c7e5 Add 'make check' target.
Matti Hamalainen <ccr@tnsp.org>
parents: 273
diff changeset
41