v4 preprocessor: use GNU make's standard variables names and default values for g++ (CXX) and ar (AR)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1885 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
5ae83c57b8
commit
06d886b370
|
@ -44,7 +44,7 @@ all-recursive:
|
||||||
make -C macro
|
make -C macro
|
||||||
|
|
||||||
$(DYNARE_M): $(OBJS) macro/libmacro.a
|
$(DYNARE_M): $(OBJS) macro/libmacro.a
|
||||||
$(CPP) $(CPPFLAGS) -o $(DYNARE_M) $(OBJS) -Lmacro -lmacro
|
$(CXX) $(CXXFLAGS) -o $(DYNARE_M) $(OBJS) -Lmacro -lmacro
|
||||||
cp $(DYNARE_M) ../matlab/
|
cp $(DYNARE_M) ../matlab/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,31 @@
|
||||||
AR = ar
|
CXXFLAGS = -Wall
|
||||||
CPP = g++
|
|
||||||
|
|
||||||
CPPFLAGS = -Wall
|
|
||||||
|
|
||||||
ifeq ($(shell uname -o), Cygwin)
|
ifeq ($(shell uname -o), Cygwin)
|
||||||
# Detection of uninitialized variables is buggy in Cygwin and generates spurious warnings
|
# Detection of uninitialized variables is buggy in Cygwin and generates spurious warnings
|
||||||
CPPFLAGS += -Wno-uninitialized
|
CXXFLAGS += -Wno-uninitialized
|
||||||
CPPFLAGS += -mno-cygwin
|
CXXFLAGS += -mno-cygwin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CROSS_WIN32), yes)
|
ifeq ($(CROSS_WIN32), yes)
|
||||||
CPP = i586-mingw32msvc-g++
|
CXX = i586-mingw32msvc-g++
|
||||||
AR = i586-mingw32msvc-ar
|
AR = i586-mingw32msvc-ar
|
||||||
# Detection of uninitialized variables is buggy in MinGW and generates spurious warnings
|
# Detection of uninitialized variables is buggy in MinGW and generates spurious warnings
|
||||||
CPPFLAGS += -Wno-uninitialized
|
CXXFLAGS += -Wno-uninitialized
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DEBUG),yes)
|
ifeq ($(DEBUG),yes)
|
||||||
CPPFLAGS += -ggdb
|
CXXFLAGS += -ggdb
|
||||||
else
|
else
|
||||||
CPPFLAGS += -O3
|
CXXFLAGS += -O3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(VALGRIND), yes)
|
ifeq ($(VALGRIND), yes)
|
||||||
CPPFLAGS = -Wall -O -g -fno-inline
|
CXXFLAGS = -Wall -O -g -fno-inline
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# General rule for compilation
|
# General rule for compilation
|
||||||
%.o : %.cc
|
%.o : %.cc
|
||||||
$(CPP) $(CPPFLAGS) -MD -I include -c $<
|
$(CXX) $(CXXFLAGS) -MD -I include -c $<
|
||||||
@cp $*.d $*.P; \
|
@cp $*.d $*.P; \
|
||||||
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
|
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
|
||||||
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
|
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
|
||||||
|
|
Loading…
Reference in New Issue