summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorerdgeist <>2007-10-01 00:27:26 +0000
committererdgeist <>2007-10-01 00:27:26 +0000
commitfb5a22816217e11ca91446c81957dd6e529a31eb (patch)
treec7cad42452e466d09d10f2a6b7e5192725cac504 /Makefile
parentc350fa0b3c323979f73d079d389219e7f98edc1b (diff)
Makefile now runs under bsdmake and gnumake again
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 5 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 2411cb4..9858fff 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
1CC?=gcc 1CC?=gcc
2FEATURES=#-DWANT_CLOSED_TRACKER -DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR 2FEATURES=#-DWANT_CLOSED_TRACKER -DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR
3FEATURES=-DWANT_IP_FROM_QUERY_STRING
3OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage 4OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage
4OPTS_production=-s -Os 5OPTS_production=-s -Os
5CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic #-ansi 6CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic #-ansi
@@ -14,24 +15,10 @@ all: $(BINARY) $(BINARY).debug
14CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) 15CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES)
15CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES) 16CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES)
16 17
17OBJECTS_debug = $(SOURCES:%.c=%.debug.o)
18OBJECTS_production = $(SOURCES:%.c=%.production.o)
19
20$(OBJECTS_debug) $(OBJECTS_production): $(HEADERS)
21
22%.production.o : CFLAGS := $(CFLAGS_production)
23%.debug.o : CFLAGS := $(CFLAGS_debug)
24
25%.production.o : %.c
26 $(COMPILE.c) $(OUTPUT_OPTION) $<
27%.debug.o : %.c
28 $(COMPILE.c) $(OUTPUT_OPTION) $<
29
30$(BINARY): $(OBJECTS_production) 18$(BINARY): $(OBJECTS_production)
31 $(CC) $^ -o $@ $(CFLAGS_production) $(LDFLAGS) 19 $(CC) $? -o $@ $(SOURCES) $(CFLAGS_production) $(LDFLAGS)
32$(BINARY).debug: $(OBJECTS_debug) 20$(BINARY).debug: $(OBJECTS_debug)
33 $(CC) $^ -o $@ $(CFLAGS_debug) $(LDFLAGS) 21 $(CC) $? -o $@ $(SOURCES) $(CFLAGS_debug) $(LDFLAGS)
34
35 clean:
36 rm -rf opentracker *.o *~
37 22
23clean:
24 rm -rf opentracker opentracker.debug *.o *~