annotate Makefile.gen @ 177:fdc771411795

Makefile $(RM) implies -f .. don't include the option in commands.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 15 Nov 2010 07:54:38 +0200
parents f265e7274a45
children 209546c5b7d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
93
7f9f6af26a65 Move -DTH_NO_DEFAULTS to Makefile.gen instead.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
1 CFLAGS+=-g -W -Wall -O2 -DTH_NO_DEFAULTS
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 COMP=$(CC) $(CFLAGS)
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 # Objects
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 NNCHAT_BIN=$(BINPATH)nnchat$(EXEEXT)
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
159
1b6bc8bf6ac3 Create win32/ subdirectory if needed.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
9 TARGETS+=$(NNCHAT_BIN)
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 # Target rules
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #
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
15 all: $(NONBUILD) $(TARGETS)
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
83
9baefdd4179c Use win32/ subdirectory for object files also.
Matti Hamalainen <ccr@tnsp.org>
parents: 68
diff changeset
17 $(OBJPATH)%.o: %.c %.h
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 $(COMP) -c -o $@ $<
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19
103
eaa524e153f9 Initial implementation of functions for implementing tab-completion for user names.
Matti Hamalainen <ccr@tnsp.org>
parents: 93
diff changeset
20 $(NNCHAT_BIN): nnchat.c $(OBJPATH)libnnchat.o $(OBJPATH)th_util.o $(OBJPATH)th_string.o $(OBJPATH)th_args.o $(OBJPATH)th_config.o
68
3ab7751fdad1 MingW compatibility, with one ugly kludge.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
21 $(COMP) -o $@ $+ $(LDFLAGS)
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 #
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 # Special targets
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 #
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 clean:
177
fdc771411795 Makefile $(RM) implies -f .. don't include the option in commands.
Matti Hamalainen <ccr@tnsp.org>
parents: 176
diff changeset
27 $(RM) $(TARGETS) $(OBJPATH)*.o
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 srcclean: 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) *~
0
728243125263 Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31