Mercurial > hg > th-libs
annotate Makefile.gen @ 426:56874ab723d3
Fix build for older GCC versions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 31 May 2016 16:16:04 +0300 |
parents | ec109cbaddfb |
children | 0a2f32b8a26e |
rev | line source |
---|---|
426
56874ab723d3
Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents:
419
diff
changeset
|
1 CFLAGS += -W -Wall -Wextra -D_XOPEN_SOURCE=500 -I./ |
56874ab723d3
Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents:
419
diff
changeset
|
2 #CFLAGS += -std=c11 -pedantic |
406 | 3 CFLAGS += -g |
254
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 CFLAGS += -O2 |
426
56874ab723d3
Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents:
419
diff
changeset
|
5 CFLAGS += -DTH_USE_INTERNAL_SPRINTF=1 |
406 | 6 CFLAGS += -DTH_PRINTF_DEBUG=1 |
426
56874ab723d3
Fix build for older GCC versions.
Matti Hamalainen <ccr@tnsp.org>
parents:
419
diff
changeset
|
7 |
406 | 8 THLIBS = ./ |
254
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 # |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 # Objects |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 # |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 THLIBS_A=$(OBJPATH)thlibs.a |
273 | 14 THLIBS_OBJ=th_util.o th_config.o th_string.o th_ioctx.o \ |
15 th_args.o th_crypto.o th_datastruct.o th_network.o | |
16 | |
254
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 TESTS_OBJ=tests.o |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 TESTS_BIN=$(BINPATH)tests$(EXEEXT) |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 TARGETS += $(TESTS_BIN) |
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 |
302 | 23 $(TESTS_BIN): $(addprefix $(OBJPATH),$(TESTS_OBJ)) $(THLIBS_A) |
418
3c1bd6c55e00
Make build process less noisy.
Matti Hamalainen <ccr@tnsp.org>
parents:
417
diff
changeset
|
24 @echo " LINK $@" |
3c1bd6c55e00
Make build process less noisy.
Matti Hamalainen <ccr@tnsp.org>
parents:
417
diff
changeset
|
25 @$(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) |
254
3d1e2af4e4e6
Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 |
292 | 27 check: $(TESTS_BIN) |
28 $(TESTS_BIN) -v | |
29 | |
419
ec109cbaddfb
Split some build stuff into Makefile.inc
Matti Hamalainen <ccr@tnsp.org>
parents:
418
diff
changeset
|
30 include $(THLIBS)/Makefile.inc |