use CXX instead of gcc directly
parent
6de6ad385c
commit
9a4304c42d
13
GNUmakefile
13
GNUmakefile
|
|
@ -10,9 +10,14 @@ ARFLAGS = -cr # ar needs the dash on OpenBSD
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
UNAME = $(shell uname)
|
UNAME = $(shell uname)
|
||||||
ISX86 = $(shell uname -m | grep -c "i.86\|x86_64")
|
ISX86 = $(shell uname -m | grep -c "i.86\|x86_64")
|
||||||
GCC33ORLATER = $(shell gcc -v 2>&1 | grep -c "gcc version \(3.[3-9]\|[4-9]\)")
|
|
||||||
ISMINGW = $(shell uname | grep -c "MINGW32")
|
ISMINGW = $(shell uname | grep -c "MINGW32")
|
||||||
|
|
||||||
|
ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
|
||||||
|
CXX = g++
|
||||||
|
endif
|
||||||
|
|
||||||
|
GCC33ORLATER = $(shell $(CXX) -v 2>&1 | grep -c "gcc version \(3.[3-9]\|[4-9]\)")
|
||||||
|
|
||||||
ifeq ($(ISX86) $(GCC33ORLATER) $(ISMINGW),1 1 0) # MINGW32 is missing the memalign function
|
ifeq ($(ISX86) $(GCC33ORLATER) $(ISMINGW),1 1 0) # MINGW32 is missing the memalign function
|
||||||
CXXFLAGS += -msse2
|
CXXFLAGS += -msse2
|
||||||
endif
|
endif
|
||||||
|
|
@ -31,7 +36,7 @@ ifeq ($(UNAME),Darwin)
|
||||||
AR = libtool
|
AR = libtool
|
||||||
ARFLAGS = -static -o
|
ARFLAGS = -static -o
|
||||||
CXXFLAGS += -D__pic__
|
CXXFLAGS += -D__pic__
|
||||||
IS_GCC2 = $(shell c++ -v 2>&1 | grep -c gcc-932)
|
IS_GCC2 = $(shell $(CXX) -v 2>&1 | grep -c gcc-932)
|
||||||
ifeq ($(IS_GCC2),1)
|
ifeq ($(IS_GCC2),1)
|
||||||
CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables
|
CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables
|
||||||
CXX = c++
|
CXX = c++
|
||||||
|
|
@ -44,10 +49,6 @@ ifeq ($(UNAME),SunOS)
|
||||||
LDLIBS += -lnsl -lsocket
|
LDLIBS += -lnsl -lsocket
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
|
|
||||||
CXX = g++
|
|
||||||
endif
|
|
||||||
|
|
||||||
SRCS = $(wildcard *.cpp)
|
SRCS = $(wildcard *.cpp)
|
||||||
ifeq ($(SRCS),) # workaround wildcard function bug in GNU Make 3.77
|
ifeq ($(SRCS),) # workaround wildcard function bug in GNU Make 3.77
|
||||||
SRCS = $(shell ls *.cpp)
|
SRCS = $(shell ls *.cpp)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue