Mercurial > hg > nnchat
annotate Makefile.gen @ 199:5ef630818bef
Get version number from external file 'VERSION'.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 18 Nov 2010 01:27:03 +0200 |
parents | 829457be9eea |
children | 78f47ae47c2a |
rev | line source |
---|---|
199
5ef630818bef
Get version number from external file 'VERSION'.
Matti Hamalainen <ccr@tnsp.org>
parents:
195
diff
changeset
|
1 NN_VERSION := `cat VERSION` |
195
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
183
diff
changeset
|
2 |
199
5ef630818bef
Get version number from external file 'VERSION'.
Matti Hamalainen <ccr@tnsp.org>
parents:
195
diff
changeset
|
3 CFLAGS+=-g -W -Wall -O2 -DTH_NO_DEFAULTS |
5ef630818bef
Get version number from external file 'VERSION'.
Matti Hamalainen <ccr@tnsp.org>
parents:
195
diff
changeset
|
4 #CFLAGS+=-g -W -Wall -DTH_NO_DEFAULTS |
0 | 5 COMP=$(CC) $(CFLAGS) |
6 | |
7 # | |
8 # Objects | |
9 # | |
10 NNCHAT_BIN=$(BINPATH)nnchat$(EXEEXT) | |
11 | |
159
1b6bc8bf6ac3
Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents:
103
diff
changeset
|
12 TARGETS+=$(NNCHAT_BIN) |
0 | 13 |
14 | |
15 # | |
16 # Target rules | |
17 # | |
176
f265e7274a45
Add a 'NONBUILD' target list for non-builded targets, use it for win32 subdir creation.
Matti Hamalainen <ccr@tnsp.org>
parents:
159
diff
changeset
|
18 all: $(NONBUILD) $(TARGETS) |
0 | 19 |
83
9baefdd4179c
Use win32/ subdirectory for object files also.
Matti Hamalainen <ccr@tnsp.org>
parents:
68
diff
changeset
|
20 $(OBJPATH)%.o: %.c %.h |
0 | 21 $(COMP) -c -o $@ $< |
22 | |
195
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
183
diff
changeset
|
23 $(NNCHAT_BIN): nnchat.c $(OBJPATH)libnnchat.o $(OBJPATH)th_util.o $(OBJPATH)th_string.o $(OBJPATH)th_args.o $(OBJPATH)th_config.o $(EXTRAOBJS) |
829457be9eea
Build system changes to support (in a big kludgy manner) icon and version information resource generation for Win32 binaries.
Matti Hamalainen <ccr@tnsp.org>
parents:
183
diff
changeset
|
24 $(COMP) -o $@ $+ $(LDFLAGS) -DNN_VERSION=\"$(NN_VERSION)\" |
0 | 25 |
26 # | |
27 # Special targets | |
28 # | |
29 clean: | |
177
fdc771411795
Makefile $(RM) implies -f .. don't include the option in commands.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
30 $(RM) $(TARGETS) $(OBJPATH)*.o |
0 | 31 |
32 srcclean: clean | |
177
fdc771411795
Makefile $(RM) implies -f .. don't include the option in commands.
Matti Hamalainen <ccr@tnsp.org>
parents:
176
diff
changeset
|
33 $(RM) *~ |
0 | 34 |