use standard make variables

This commit is contained in:
Kill Your TV 2014-10-29 21:54:47 +00:00
parent 524b2e9f8a
commit 5acbc6a23e
6 changed files with 15 additions and 19 deletions

View File

@ -11,13 +11,13 @@ endif
all: obj i2p
i2p: $(OBJECTS:obj/%=obj/%)
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
$(CXX) -o $@ $^ $(LDFLAGS) $(LIBS)
.SUFFIXES:
.SUFFIXES: .c .cc .C .cpp .o
obj/%.o : %.cpp
$(CC) -o $@ $< -c $(CFLAGS) $(INCFLAGS) $(CPU_FLAGS)
$(CXX) -o $@ $< -c $(CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS)
obj:
mkdir -p obj

View File

@ -1,5 +1,5 @@
CC = g++
CFLAGS = -std=c++11 -O2
CXX = g++
CXXFLAGS = -std=c++11 -O2
include filelist.mk
INCFLAGS = -I/usr/include/ -I/usr/local/include/
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread

View File

@ -1,16 +1,15 @@
CC = g++
CFLAGS = -g -Wall
CXXVER := $(shell ${CC} -dumpversion)
CXXFLAGS = -g -Wall
CXXVER := $(shell $(CXX) -dumpversion)
FGREP = fgrep
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(FGREP) -c "64")
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
CFLAGS += -std=c++11
CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
CFLAGS += -std=c++11
CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
CFLAGS += -std=c++0x
CXXFLAGS += -std=c++0x
else # not supported
$(error Compiler too old)
endif

View File

@ -1,5 +1,5 @@
CC = clang++
CFLAGS = -g -Wall -std=c++11 -lstdc++ -I/usr/local/include
CXX = clang++
CXXFLAGS = -g -Wall -std=c++11 -lstdc++ -I/usr/local/include
include filelist.mk
INCFLAGS = -DCRYPTOPP_DISABLE_ASM
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
@ -9,7 +9,7 @@ LIBS =
# http://www.hutsby.net/2011/08/macs-with-aes-ni.html
# Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
CFLAGS += -maes -DAESNI
CXXFLAGS += -maes -DAESNI
# Apple Mac OSX
UNAME_S := $(shell uname -s)

View File

@ -1,8 +1,6 @@
diff --git a/Makefile b/Makefile
index 9b9425b..84de72f 100644
--- a/Makefile
+++ b/Makefile
@@ -8,9 +8,9 @@ else
@@ -10,9 +10,9 @@
include Makefile.linux
endif
@ -11,10 +9,10 @@ index 9b9425b..84de72f 100644
-i2p: $(OBJECTS:obj/%=obj/%)
+i2pd: $(OBJECTS:obj/%=obj/%)
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
$(CXX) -o $@ $^ $(LDFLAGS) $(LIBS)
.SUFFIXES:
@@ -23,7 +23,7 @@ obj:
@@ -25,7 +25,7 @@
mkdir -p obj
clean:

1
debian/rules vendored
View File

@ -6,7 +6,6 @@
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)
PREFIX=/usr