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