Browse Source

update makefile

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/65/head
R4SAS 4 years ago
parent
commit
c9408c6121
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 26
      Makefile

26
Makefile

@ -1,6 +1,8 @@
UNAME = $(shell uname -s) UNAME = $(shell uname -s)
I2PD_PATH = i2pd I2PD_PATH = i2pd
I2PD_LIB = libi2pd.a
LIBI2PD_PATH = $(I2PD_PATH)/libi2pd LIBI2PD_PATH = $(I2PD_PATH)/libi2pd
LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client
CXX ?= g++ CXX ?= g++
@ -18,10 +20,10 @@ else
BOOST_SUFFIX = -mt BOOST_SUFFIX = -mt
endif endif
INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH) -I$(I2PD_PATH) INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH)
CXXFLAGS = $(FLAGS) CXXFLAGS = $(FLAGS)
LDFLAGS = LDFLAGS =
LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lz LIBS = $(I2PD_PATH)/$(I2PD_LIB) -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lz
ifeq ($(UNAME),Linux) ifeq ($(UNAME),Linux)
LIBS += -lrt -lpthread LIBS += -lrt -lpthread
@ -36,14 +38,9 @@ else ifeq ($(UNAME),FreeBSD)
else else
# Win32 # Win32
LIBS += -lws2_32 -lwsock32 -lgdi32 -liphlpapi -lstdc++ -lpthread LIBS += -lws2_32 -lwsock32 -lgdi32 -liphlpapi -lstdc++ -lpthread
LDFLAGS += -Wl,-Bstatic -static-libgcc -static-libstdc++ LDFLAGS += -s -Wl,-Bstatic -static-libgcc -static-libstdc++
endif endif
SOURCES = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
I2PD_LIB = libi2pd.a
all: $(I2PD_LIB) keygen keyinfo famtool routerinfo regaddr regaddr_3ld vain i2pbase64 offlinekeys b33address regaddralias all: $(I2PD_LIB) keygen keyinfo famtool routerinfo regaddr regaddr_3ld vain i2pbase64 offlinekeys b33address regaddralias
routerinfo: routerinfo.o $(I2PD_LIB) routerinfo: routerinfo.o $(I2PD_LIB)
@ -79,8 +76,6 @@ b33address: b33address.o $(I2PD_LIB)
regaddralias: regaddralias.o $(I2PD_LIB) regaddralias: regaddralias.o $(I2PD_LIB)
$(CXX) -o regaddralias regaddralias.o $(LDFLAGS) $(LIBS) $(CXX) -o regaddralias regaddralias.o $(LDFLAGS) $(LIBS)
$(OBJECTS): $(I2PD_LIB)
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .c .cc .C .cpp .o .SUFFIXES: .c .cc .C .cpp .o
@ -93,21 +88,20 @@ $(I2PD_LIB):
count: count:
wc *.c *.cc *.C *.cpp *.h *.hpp wc *.c *.cc *.C *.cpp *.h *.hpp
clean: clean-bin clean-obj
clean-i2pd: clean-i2pd:
$(MAKE) -C $(I2PD_PATH) clean $(MAKE) -C $(I2PD_PATH) clean
clean-obj: clean-obj:
rm -f $(OBJECTS) rm -f $(wildcard *.o)
clean-bin: clean-bin:
rm -f keyinfo keygen famtool regaddr regaddr_3ld routerinfo i2pbase64 vain offlinekeys b33address changeaddr rm -f b33address famtool i2pbase64 keygen keyinfo offlinekeys regaddr regaddr_3ld regaddralias routerinfo vain
clean: clean-i2pd clean-obj clean-bin clean: clean-i2pd clean-obj clean-bin
.PHONY: all .PHONY: all
.PHONY: count .PHONY: count
.PHONY: clean
.PHONY: clean-i2pd .PHONY: clean-i2pd
.PHONY: clean-bin .PHONY: clean-obj
.PHONY: clean-bin
.PHONY: clean

Loading…
Cancel
Save