2008-02-07 22:20:49 +01:00
|
|
|
AR = ar
|
2008-02-03 11:28:36 +01:00
|
|
|
CPP = g++
|
|
|
|
|
|
|
|
CPPFLAGS = -Wall
|
|
|
|
|
|
|
|
ifeq ($(shell uname -o), Cygwin)
|
|
|
|
# Detection of uninitialized variables is buggy in Cygwin and generates spurious warnings
|
|
|
|
CPPFLAGS += -Wno-uninitialized
|
|
|
|
CPPFLAGS += -mno-cygwin
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CROSS_WIN32), yes)
|
|
|
|
CPP = i586-mingw32msvc-g++
|
2008-02-07 22:20:49 +01:00
|
|
|
AR = i586-mingw32msvc-ar
|
2008-02-03 11:28:36 +01:00
|
|
|
# Detection of uninitialized variables is buggy in MinGW and generates spurious warnings
|
|
|
|
CPPFLAGS += -Wno-uninitialized
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),yes)
|
|
|
|
CPPFLAGS += -ggdb
|
|
|
|
else
|
|
|
|
CPPFLAGS += -O3
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(VALGRIND), yes)
|
|
|
|
CPPFLAGS = -Wall -O -g -fno-inline
|
|
|
|
endif
|
|
|
|
|
|
|
|
# General rule for compilation
|
|
|
|
%.o : %.cc
|
|
|
|
$(CPP) $(CPPFLAGS) -MD -I include -c $<
|
|
|
|
@cp $*.d $*.P; \
|
|
|
|
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
|
|
|
|
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
|
|
|
|
rm -f $*.d
|
|
|
|
|
|
|
|
# Local variables:
|
|
|
|
# mode: makefile
|
|
|
|
# End:
|