mirror of
git://erdgeist.org/opentracker
synced 2025-02-22 09:01:29 +08:00
Makefile now runs under bsdmake and gnumake again
This commit is contained in:
parent
c350fa0b3c
commit
fb5a228162
23
Makefile
23
Makefile
@ -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)
|
||||
|
||||
clean:
|
||||
rm -rf opentracker *.o *~
|
||||
$(CC) $? -o $@ $(SOURCES) $(CFLAGS_debug) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -rf opentracker opentracker.debug *.o *~
|
||||
|
Loading…
x
Reference in New Issue
Block a user