e20b08bbfc
WWW: http://sourceforge.net/projects/cdbfasta/ PR: 203233 Submitted by: Jason Bacon <jwbacon@tds.net>
54 lines
1.2 KiB
Text
54 lines
1.2 KiB
Text
--- Makefile.orig 2009-12-03 20:17:51 UTC
|
|
+++ Makefile
|
|
@@ -18,7 +18,10 @@ else
|
|
MARCH =
|
|
endif
|
|
|
|
-CC := g++
|
|
+# Use the correct compiler (CXX, not CC) and respect the environment
|
|
+# by using ?=
|
|
+CXX ?= g++
|
|
+
|
|
BASEFLAGS = -Wall ${SEARCHDIRS} $(MARCH) -DENABLE_COMPRESSION=0 -D_FILE_OFFSET_BITS=64 \
|
|
-D_LARGEFILE_SOURCE -fno-exceptions -fno-rtti -fno-strict-aliasing \
|
|
-D_REENTRANT
|
|
@@ -33,30 +36,30 @@ else
|
|
endif
|
|
|
|
ifeq ($(findstring nommap,$(MAKECMDGOALS)),)
|
|
- CFLAGS = $(DBGFLAGS) $(BASEFLAGS)
|
|
+ CXXFLAGS = $(DBGFLAGS) $(BASEFLAGS)
|
|
else
|
|
- CFLAGS = $(DBGFLAGS) $(BASEFLAGS) -DNO_MMAP
|
|
+ CXXFLAGS = $(DBGFLAGS) $(BASEFLAGS) -DNO_MMAP
|
|
endif
|
|
|
|
%.o : %.c
|
|
- ${CC} ${CFLAGS} -c $< -o $@
|
|
+ ${CXX} ${CXXFLAGS} -c $< -o $@
|
|
|
|
%.o : %.cc
|
|
- ${CC} ${CFLAGS} -c $< -o $@
|
|
+ ${CXX} ${CXXFLAGS} -c $< -o $@
|
|
|
|
%.o : %.C
|
|
- ${CC} ${CFLAGS} -c $< -o $@
|
|
+ ${CXX} ${CXXFLAGS} -c $< -o $@
|
|
|
|
%.o : %.cpp
|
|
- ${CC} ${CFLAGS} -c $< -o $@
|
|
+ ${CXX} ${CXXFLAGS} -c $< -o $@
|
|
|
|
%.o : %.cxx
|
|
- ${CC} ${CFLAGS} -c $< -o $@
|
|
+ ${CXX} ${CXXFLAGS} -c $< -o $@
|
|
|
|
# C/C++ linker
|
|
|
|
-LINKER := g++
|
|
-LDFLAGS = -lz
|
|
+LINKER := ${CXX}
|
|
+LDFLAGS = -lz
|
|
#if ENABLE_COMPRESSION is not needed,
|
|
# LDFLAGS =
|
|
|