Makefile now runs under bsdmake and gnumake again

dynamic-accesslists
erdgeist 17 years ago
parent c350fa0b3c
commit fb5a228162

@ -1,5 +1,6 @@
CC?=gcc
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_production=-s -Os
CFLAGS+=-I../libowfat -Wall -pipe -Wextra #-pedantic #-ansi
@ -14,24 +15,10 @@ all: $(BINARY) $(BINARY).debug
CFLAGS_production = $(CFLAGS) $(OPTS_production) $(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)
$(CC) $^ -o $@ $(CFLAGS_production) $(LDFLAGS)
$(CC) $? -o $@ $(SOURCES) $(CFLAGS_production) $(LDFLAGS)
$(BINARY).debug: $(OBJECTS_debug)
$(CC) $^ -o $@ $(CFLAGS_debug) $(LDFLAGS)
$(CC) $? -o $@ $(SOURCES) $(CFLAGS_debug) $(LDFLAGS)
clean:
rm -rf opentracker *.o *~
rm -rf opentracker opentracker.debug *.o *~

Loading…
Cancel
Save