|
|
@ -1,5 +1,6 @@ |
|
|
|
CC?=gcc |
|
|
|
CC?=gcc |
|
|
|
FEATURES=#-DWANT_CLOSED_TRACKER -DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR |
|
|
|
FEATURES=#-DWANT_CLOSED_TRACKER -DWANT_IP_FROM_QUERY_STRING -D_DEBUG_HTTPERROR |
|
|
|
|
|
|
|
FEATURES=-DWANT_IP_FROM_QUERY_STRING |
|
|
|
OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage |
|
|
|
OPTS_debug=-g -ggdb #-pg # -fprofile-arcs -ftest-coverage |
|
|
|
OPTS_production=-s -Os |
|
|
|
OPTS_production=-s -Os |
|
|
|
CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic #-ansi |
|
|
|
CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic #-ansi |
|
|
@ -14,24 +15,10 @@ all: $(BINARY) $(BINARY).debug |
|
|
|
CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) |
|
|
|
CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) |
|
|
|
CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES) |
|
|
|
CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES) |
|
|
|
|
|
|
|
|
|
|
|
OBJECTS_debug = $(SOURCES:%.c=%.debug.o) |
|
|
|
|
|
|
|
OBJECTS_production = $(SOURCES:%.c=%.production.o) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(OBJECTS_debug) $(OBJECTS_production): $(HEADERS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%.production.o : CFLAGS := $(CFLAGS_production) |
|
|
|
|
|
|
|
%.debug.o : CFLAGS := $(CFLAGS_debug) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%.production.o : %.c |
|
|
|
|
|
|
|
$(COMPILE.c) $(OUTPUT_OPTION) $< |
|
|
|
|
|
|
|
%.debug.o : %.c |
|
|
|
|
|
|
|
$(COMPILE.c) $(OUTPUT_OPTION) $< |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(BINARY): $(OBJECTS_production) |
|
|
|
$(BINARY): $(OBJECTS_production) |
|
|
|
$(CC) $^ -o $@ $(CFLAGS_production) $(LDFLAGS) |
|
|
|
$(CC) $? -o $@ $(SOURCES) $(CFLAGS_production) $(LDFLAGS) |
|
|
|
$(BINARY).debug: $(OBJECTS_debug) |
|
|
|
$(BINARY).debug: $(OBJECTS_debug) |
|
|
|
$(CC) $^ -o $@ $(CFLAGS_debug) $(LDFLAGS) |
|
|
|
$(CC) $? -o $@ $(SOURCES) $(CFLAGS_debug) $(LDFLAGS) |
|
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
|
|
|
|
rm -rf opentracker *.o *~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
|
|
|
|
rm -rf opentracker opentracker.debug *.o *~ |
|
|
|