annotate Makefile.gen @ 707:11eb7c30889e

Adjust to fit new th_ioctx API.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 10 Mar 2020 17:01:22 +0200
parents cc4478e5a8c3
children 144bdfca82d1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
665
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents: 647
diff changeset
1 ###
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents: 647
diff changeset
2 ### Main makefile
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents: 647
diff changeset
3 ###
679
ec7e61450087 TH_NO_DEFAULTS is not used anymore.
Matti Hamalainen <ccr@tnsp.org>
parents: 674
diff changeset
4 CFLAGS += -g -W -Wall -Wextra -I.
263
8c983c3b93eb CFLAGS changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
5 CFLAGS += -O2
665
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents: 647
diff changeset
6 CFLAGS += -std=c11 -pedantic -D_XOPEN_SOURCE=500
383
6d3ce7f28b65 Use a Makefile setting for th-libs location.
Matti Hamalainen <ccr@tnsp.org>
parents: 381
diff changeset
7 THLIBS=th-libs/
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
626
904c359b1ced Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 623
diff changeset
9
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #
213
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
11 # Version strings
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
12 #
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
13 NN_VERSION := $(shell cat VERSION)
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
14 comma:= ,
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
15 NN_VERSION_COM := $(subst .,$(comma),$(NN_VERSION))
465
c3b3b6d89084 Simplify buildsystem a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
16 CFLAGS += -DNN_VERSION=\"$(NN_VERSION)\"
213
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
17
78f47ae47c2a Fix Windows build.
Matti Hamalainen <ccr@tnsp.org>
parents: 199
diff changeset
18 #
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 # Objects
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 #
384
40b95d677f68 Fix build.
Matti Hamalainen <ccr@tnsp.org>
parents: 383
diff changeset
21 THLIBS_A=$(OBJPATH)thlibs.a
705
cc4478e5a8c3 Add th_ioctx_stdio.o to th-libs depencies.
Matti Hamalainen <ccr@tnsp.org>
parents: 704
diff changeset
22 THLIBS_OBJ=th_util.o th_string.o th_args.o th_file.o th_config.o \
cc4478e5a8c3 Add th_ioctx_stdio.o to th-libs depencies.
Matti Hamalainen <ccr@tnsp.org>
parents: 704
diff changeset
23 th_network.o th_datastruct.o th_ioctx.o th_ioctx_stdio.o
465
c3b3b6d89084 Simplify buildsystem a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
24
623
118276b60667 More work towards using th-libs th_network module.
Matti Hamalainen <ccr@tnsp.org>
parents: 622
diff changeset
25 NNCHAT_OBJ=main.o util.o ui.o
695
f1df1cf69a38 Rename EXEEXT to BINEXT in the build system, as per changes in th-libs build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 680
diff changeset
26 NNCHAT_BIN=$(BINPATH)nnchat$(BINEXT)
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
665
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents: 647
diff changeset
28 TARGETS += $(NNCHAT_BIN)
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29
671
dd3083a3383d Use the makefile.inc helper from th-libs for generic targets.
Matti Hamalainen <ccr@tnsp.org>
parents: 669
diff changeset
30 include $(THLIBS)/Makefile.inc
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 #
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 # Target rules
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #
413
14b685cdbd2c Rename files.
Matti Hamalainen <ccr@tnsp.org>
parents: 412
diff changeset
35 main.c: VERSION
384
40b95d677f68 Fix build.
Matti Hamalainen <ccr@tnsp.org>
parents: 383
diff changeset
36
465
c3b3b6d89084 Simplify buildsystem a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
37 $(NNCHAT_BIN): $(addprefix $(OBJPATH),$(NNCHAT_OBJ)) $(THLIBS_A) $(EXTRAOBJS)
704
b070638c5c60 Fix build.
Matti Hamalainen <ccr@tnsp.org>
parents: 695
diff changeset
38 $(LINK_C_BIN)
680
7d4730232ee3 Improve build system.
Matti Hamalainen <ccr@tnsp.org>
parents: 679
diff changeset
39
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 #
647
ff94100cfc7c Commonize README building.
Matti Hamalainen <ccr@tnsp.org>
parents: 632
diff changeset
42 # Documentation
ff94100cfc7c Commonize README building.
Matti Hamalainen <ccr@tnsp.org>
parents: 632
diff changeset
43 #
ff94100cfc7c Commonize README building.
Matti Hamalainen <ccr@tnsp.org>
parents: 632
diff changeset
44 $(DOC):
674
650e7a5c74c5 Add homepage and adjust Makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents: 671
diff changeset
45 @cat doc/index.html | tr '\n' '§' | sed "s/<.-- BEGIN -->.*<.-- END -->//g;s/<script.*<\/script>//g" | tr '§' '\n' > "$@.tmp"
647
ff94100cfc7c Commonize README building.
Matti Hamalainen <ccr@tnsp.org>
parents: 632
diff changeset
46 @links -dump "$@.tmp" > $@
ff94100cfc7c Commonize README building.
Matti Hamalainen <ccr@tnsp.org>
parents: 632
diff changeset
47