Browse Source

* (1/3) update filelist.mk : 3 lists of sources: common, daemon-specific and library-specific

pull/117/head
hagen 10 years ago
parent
commit
8c218bd5df
  1. 9
      Makefile
  2. 1
      Makefile.bsd
  3. 2
      Makefile.linux
  4. 1
      Makefile.osx
  5. 35
      filelist.mk

9
Makefile

@ -2,12 +2,19 @@ UNAME := $(shell uname -s)
SHLIB := libi2pd.so SHLIB := libi2pd.so
I2PD := i2p I2PD := i2p
include filelist.mk
ifeq ($(UNAME),Darwin) ifeq ($(UNAME),Darwin)
DAEMON_SRC += DaemonLinux.cpp
include Makefile.osx include Makefile.osx
else ifeq ($(UNAME),FreeBSD) else ifeq ($(UNAME),FreeBSD)
DAEMON_SRC += DaemonLinux.cpp
include Makefile.bsd include Makefile.bsd
else else ifeq ($(UNAME),Linux)
DAEMON_SRC += DaemonLinux.cpp
include Makefile.linux include Makefile.linux
else # win32
DAEMON_SRC += DaemonWin32.cpp
endif endif
all: obj $(SHLIB) $(I2PD) all: obj $(SHLIB) $(I2PD)

1
Makefile.bsd

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

2
Makefile.linux

@ -18,7 +18,6 @@ endif
LIBDIR := /usr/lib LIBDIR := /usr/lib
include filelist.mk
INCFLAGS = INCFLAGS =
ifeq ($(STATIC),yes) ifeq ($(STATIC),yes)
LDLIBS += $(LIBDIR)/libcryptopp.a $(LIBDIR)/libboost_system.a LDLIBS += $(LIBDIR)/libcryptopp.a $(LIBDIR)/libboost_system.a
@ -31,7 +30,6 @@ LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_
endif endif
LIBS = LIBS =
ifeq ($(USE_AESNI),yes) ifeq ($(USE_AESNI),yes)
ifeq ($(IS_64),1) ifeq ($(IS_64),1)
#check if AES-NI is supported by CPU #check if AES-NI is supported by CPU

1
Makefile.osx vendored

@ -1,6 +1,5 @@
CXX = clang++ CXX = clang++
CXXFLAGS = -g -Wall -std=c++11 -lstdc++ -I/usr/local/include CXXFLAGS = -g -Wall -std=c++11 -lstdc++ -I/usr/local/include
include filelist.mk
INCFLAGS = -DCRYPTOPP_DISABLE_ASM INCFLAGS = -DCRYPTOPP_DISABLE_ASM
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread

35
filelist.mk

@ -1,21 +1,14 @@
COMMON_SRC = \
AddressBook.cpp CryptoConst.cpp Datagram.cpp Garlic.cpp I2NPProtocol.cpp \
CPP_FILES := CryptoConst.cpp base64.cpp NTCPSession.cpp RouterInfo.cpp Transports.cpp \ LeaseSet.cpp Log.cpp NTCPSession.cpp NetDb.cpp Reseed.cpp RouterContext.cpp \
RouterContext.cpp NetDb.cpp LeaseSet.cpp Tunnel.cpp TunnelEndpoint.cpp TunnelGateway.cpp \ RouterInfo.cpp SSU.cpp SSUSession.cpp SSUData.cpp Streaming.cpp Identity.cpp \
TransitTunnel.cpp I2NPProtocol.cpp Log.cpp Garlic.cpp HTTPServer.cpp Streaming.cpp \ TransitTunnel.cpp Transports.cpp Tunnel.cpp TunnelEndpoint.cpp TunnelPool.cpp \
Destination.cpp Identity.cpp SSU.cpp SSUSession.cpp SSUData.cpp util.cpp Reseed.cpp \ TunnelGateway.cpp Destination.cpp util.cpp aes.cpp base64.cpp
DaemonLinux.cpp SSUData.cpp aes.cpp SOCKS.cpp UPnP.cpp TunnelPool.cpp HTTPProxy.cpp \
AddressBook.cpp Daemon.cpp I2PTunnel.cpp SAM.cpp BOB.cpp ClientContext.cpp \ # also: Daemon{Linux,Win32}.cpp will be added later
Datagram.cpp i2p.cpp DAEMON_SRC = $(COMMON_SRC) \
BOB.cpp ClientContext.cpp Daemon.cpp I2PTunnel.cpp SAM.cpp SOCKS.cpp UPnP.cpp \
HTTPServer.cpp HTTPProxy.cpp i2p.cpp
H_FILES := CryptoConst.h base64.h NTCPSession.h RouterInfo.h Transports.h \
RouterContext.h NetDb.h LeaseSet.h Tunnel.h TunnelEndpoint.h TunnelGateway.h \ LIB_SRC := $(COMMON_SRC) \
TransitTunnel.h I2NPProtocol.h Log.h Garlic.h HTTPServer.h Streaming.h Destination.h \ api.cpp
Identity.h SSU.h SSUSession.h SSUData.h util.h Reseed.h DaemonLinux.h SSUData.h \
aes.h SOCKS.h UPnP.h TunnelPool.h HTTPProxy.h AddressBook.h Daemon.h I2PTunnel.h \
version.h Signature.h SAM.h BOB.h ClientContext.h TransportSession.h Datagram.h
OBJECTS = $(addprefix obj/, $(notdir $(CPP_FILES:.cpp=.o)))

Loading…
Cancel
Save