diff options
author | erdgeist <> | 2007-11-06 15:18:18 +0000 |
---|---|---|
committer | erdgeist <> | 2007-11-06 15:18:18 +0000 |
commit | 7e8d7fb25929acaa1dc625fdc5eff74f300c6750 (patch) | |
tree | 895f938a155437173fdb1db8d78af2933c2dbe57 /Makefile | |
parent | 2e62624bc446ae6413b24fe002faf20e373d7c05 (diff) |
Thank you, GNU for fucking up pmake :)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,17 +1,19 @@ | |||
1 | CC?=gcc | 1 | CC?=gcc |
2 | FEATURES=#-DWANT_CLOSED_TRACKER -DWANT_UTORRENT1600_WORKAROUND -DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR -DWANT_TRACKER_SYNC | 2 | FEATURES=#-DWANT_TRACKER_SYNC -DWANT_BLACKLISTING -DWANT_CLOSED_TRACKER -DWANT_UTORRENT1600_WORKAROUND #-DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR |
3 | OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage | 3 | OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage |
4 | OPTS_production=-Os | 4 | OPTS_production=-Os |
5 | CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic -ansi | 5 | CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic -ansi |
6 | LDFLAGS+=-L../libowfat/ -lowfat | 6 | LDFLAGS+=-L../libowfat/ -lowfat |
7 | 7 | ||
8 | BINARY = opentracker | 8 | BINARY =opentracker |
9 | HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.h ot_stats.h ot_sync.h ot_vector.h ot_clean.h | 9 | HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.h ot_stats.h ot_sync.h ot_vector.h ot_clean.h |
10 | SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.c ot_mutex.c ot_stats.c ot_sync.c ot_vector.c ot_clean.c | 10 | SOURCES=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 | ||
12 | OBJECTS = $(SOURCES:%.c=%.o) | 12 | OBJECTS = $(SOURCES:%.c=%.o) |
13 | OBJECTS_debug = $(SOURCES:%.c=%.debug.o) | 13 | OBJECTS_debug = $(SOURCES:%.c=%.debug.o) |
14 | 14 | ||
15 | .SUFFIXES: .debug.o .o .c | ||
16 | |||
15 | all: $(BINARY) $(BINARY).debug | 17 | all: $(BINARY) $(BINARY).debug |
16 | 18 | ||
17 | CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) | 19 | CFLAGS_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 | ||
32 | clean: | 34 | clean: |