Mercurial > hg > th-libs
annotate Makefile.gen @ 605:566e6ef41f9d
Initial commit of the highly experimental and unfinished regular expression
parsing and matching code + unfinished test harness stuff. Not to be used.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 16 Jan 2020 01:09:00 +0200 |
parents | 3851e00bcd71 |
children | afcaf5e38f56 |
rev | line source |
---|---|
601 | 1 ### |
2 ### Compiler flags and paths | |
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 | 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 | 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 |
605
566e6ef41f9d
Initial commit of the highly experimental and unfinished regular expression
Matti Hamalainen <ccr@tnsp.org>
parents:
601
diff
changeset
|
11 CFLAGS += -DTH_EXPERIMENTAL_REGEX=1 |
426
56874ab723d3
Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents:
419
diff
changeset
|
12 |
406 | 13 THLIBS = ./ |
254
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 |
601 | 15 ### |
16 ### Objects and binaries | |
17 ### | |
254
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 THLIBS_A=$(OBJPATH)thlibs.a |
273 | 19 THLIBS_OBJ=th_util.o th_config.o th_string.o th_ioctx.o \ |
476 | 20 th_args.o th_crypto.o th_datastruct.o th_network.o \ |
605
566e6ef41f9d
Initial commit of the highly experimental and unfinished regular expression
Matti Hamalainen <ccr@tnsp.org>
parents:
601
diff
changeset
|
21 th_file.o th_regex.o |
273 | 22 |
254
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 TESTS_OBJ=tests.o |
562
5d2c1bfc04aa
Rename EXEEXT to BINEXT in the build system.
Matti Hamalainen <ccr@tnsp.org>
parents:
476
diff
changeset
|
25 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
|
26 |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 TARGETS += $(TESTS_BIN) |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 |
433 | 29 include $(THLIBS)/Makefile.inc |
30 | |
601 | 31 |
32 ### | |
33 ### Extra targets | |
34 ### | |
302 | 35 $(TESTS_BIN): $(addprefix $(OBJPATH),$(TESTS_OBJ)) $(THLIBS_A) |
601 | 36 $(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
|
37 |
292 | 38 check: $(TESTS_BIN) |
39 $(TESTS_BIN) -v | |
40 |