summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorerdgeist <>2007-11-06 15:18:18 +0000
committererdgeist <>2007-11-06 15:18:18 +0000
commit7e8d7fb25929acaa1dc625fdc5eff74f300c6750 (patch)
tree895f938a155437173fdb1db8d78af2933c2dbe57 /Makefile
parent2e62624bc446ae6413b24fe002faf20e373d7c05 (diff)
Thank you, GNU for fucking up pmake :)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index ea00d75..822716e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,19 @@
1CC?=gcc 1CC?=gcc
2FEATURES=#-DWANT_CLOSED_TRACKER -DWANT_UTORRENT1600_WORKAROUND -DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR -DWANT_TRACKER_SYNC 2FEATURES=#-DWANT_TRACKER_SYNC -DWANT_BLACKLISTING -DWANT_CLOSED_TRACKER -DWANT_UTORRENT1600_WORKAROUND #-DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR
3OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage 3OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage
4OPTS_production=-Os 4OPTS_production=-Os
5CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic -ansi 5CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic -ansi
6LDFLAGS+=-L../libowfat/ -lowfat 6LDFLAGS+=-L../libowfat/ -lowfat
7 7
8BINARY = opentracker 8BINARY =opentracker
9HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.h ot_stats.h ot_sync.h ot_vector.h ot_clean.h 9HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.h ot_stats.h ot_sync.h ot_vector.h ot_clean.h
10SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.c ot_mutex.c ot_stats.c ot_sync.c ot_vector.c ot_clean.c 10SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.c ot_mutex.c ot_stats.c ot_sync.c ot_vector.c ot_clean.c
11 11
12OBJECTS = $(SOURCES:%.c=%.o) 12OBJECTS = $(SOURCES:%.c=%.o)
13OBJECTS_debug = $(SOURCES:%.c=%.debug.o) 13OBJECTS_debug = $(SOURCES:%.c=%.debug.o)
14 14
15.SUFFIXES: .debug.o .o .c
16
15all: $(BINARY) $(BINARY).debug 17all: $(BINARY) $(BINARY).debug
16 18
17CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) 19CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES)
@@ -23,10 +25,10 @@ $(BINARY): $(OBJECTS)
23$(BINARY).debug: $(OBJECTS_debug) $(HEADERS) 25$(BINARY).debug: $(OBJECTS_debug) $(HEADERS)
24 $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS) 26 $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
25 27
26%.debug.o : %.c $(HEADERS) 28.c.debug.o : $(HEADERS)
27 $(CC) -c -o $@ $(CFLAGS_debug) $< 29 $(CC) -c -o $@ $(CFLAGS_debug) $(<:.debug.o=.c)
28 30
29%.o : %.c $(HEADERS) 31.c.o : $(HEADERS)
30 $(CC) -c -o $@ $(CFLAGS_production) $< 32 $(CC) -c -o $@ $(CFLAGS_production) $<
31 33
32clean: 34clean: