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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
406
30432a52026a Adjust build flags.
Matti Hamalainen <ccr@tnsp.org>
parents: 382
diff changeset
1 CFLAGS += -W -Wall -Wextra -std=c11 -pedantic -I./ -D_XOPEN_SOURCE=500 -DTH_USE_INTERNAL_SPRINTF=1
30432a52026a Adjust build flags.
Matti Hamalainen <ccr@tnsp.org>
parents: 382
diff changeset
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
30432a52026a Adjust build flags.
Matti Hamalainen <ccr@tnsp.org>
parents: 382
diff changeset
4 CFLAGS += -DTH_PRINTF_DEBUG=1
30432a52026a Adjust build flags.
Matti Hamalainen <ccr@tnsp.org>
parents: 382
diff changeset
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
7bea1d5ab944 Build all modules.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
11 THLIBS_OBJ=th_util.o th_config.o th_string.o th_ioctx.o \
7bea1d5ab944 Build all modules.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
12 th_args.o th_crypto.o th_datastruct.o th_network.o
7bea1d5ab944 Build all modules.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
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
3f05f6fb5dfd Fix build.
Matti Hamalainen <ccr@tnsp.org>
parents: 294
diff changeset
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
54032f17c7e5 Add 'make check' target.
Matti Hamalainen <ccr@tnsp.org>
parents: 273
diff changeset
24 check: $(TESTS_BIN)
54032f17c7e5 Add 'make check' target.
Matti Hamalainen <ccr@tnsp.org>
parents: 273
diff changeset
25 $(TESTS_BIN) -v
54032f17c7e5 Add 'make check' target.
Matti Hamalainen <ccr@tnsp.org>
parents: 273
diff changeset
26
419
ec109cbaddfb Split some build stuff into Makefile.inc
Matti Hamalainen <ccr@tnsp.org>
parents: 418
diff changeset
27 include $(THLIBS)/Makefile.inc