2013-12-10 17:05:42 +04:00
|
|
|
|
|
|
|
CC = g++
|
|
|
|
CFLAGS = -g -Wall -std=c++0x
|
2014-05-02 19:42:30 +04:00
|
|
|
OBJECTS = obj/CryptoConst.o obj/base64.o obj/NTCPSession.o obj/RouterInfo.o obj/Transports.o \
|
2014-01-31 05:49:06 +04:00
|
|
|
obj/RouterContext.o obj/NetDb.o obj/LeaseSet.o obj/Tunnel.o obj/TunnelEndpoint.o \
|
|
|
|
obj/TunnelGateway.o obj/TransitTunnel.o obj/I2NPProtocol.o obj/Log.o obj/Garlic.o \
|
2014-02-10 00:15:47 +04:00
|
|
|
obj/HTTPServer.o obj/Streaming.o obj/Identity.o obj/SSU.o obj/util.o obj/Reseed.o \
|
2014-05-02 19:42:30 +04:00
|
|
|
obj/UPnP.o obj/TunnelPool.o obj/HTTPProxy.o obj/AddressBook.o obj/Daemon.o \
|
2014-05-06 20:22:22 +04:00
|
|
|
obj/DaemonLinux.o obj/SSUData.o obj/i2p.o obj/aes.o
|
2013-12-10 17:05:42 +04:00
|
|
|
INCFLAGS =
|
2014-02-01 07:09:55 +04:00
|
|
|
LDFLAGS = -Wl,-rpath,/usr/local/lib -lcryptopp -lboost_system -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
2013-12-10 17:05:42 +04:00
|
|
|
LIBS =
|
|
|
|
|
2014-06-02 18:05:04 +04:00
|
|
|
#check if AES-NI is supported by CPU
|
|
|
|
ifneq ($(shell grep -c aes /proc/cpuinfo),0)
|
|
|
|
CPU_FLAGS = -DAESNI
|
|
|
|
endif
|
|
|
|
|
2014-01-31 07:23:13 +04:00
|
|
|
all: obj i2p
|
2013-12-10 17:05:42 +04:00
|
|
|
|
2014-01-31 05:49:06 +04:00
|
|
|
i2p: $(OBJECTS:obj/%=obj/%)
|
|
|
|
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
2013-12-10 17:05:42 +04:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .c .cc .C .cpp .o
|
|
|
|
|
2014-01-31 05:49:06 +04:00
|
|
|
obj/%.o : %.cpp
|
2014-06-02 18:05:04 +04:00
|
|
|
$(CC) -o $@ $< -c $(CFLAGS) $(INCFLAGS) $(CPU_FLAGS)
|
2013-12-10 17:05:42 +04:00
|
|
|
|
2014-01-31 07:23:13 +04:00
|
|
|
obj:
|
|
|
|
mkdir -p obj
|
|
|
|
|
2013-12-10 17:05:42 +04:00
|
|
|
clean:
|
2014-01-31 07:23:13 +04:00
|
|
|
rm -fr obj i2p
|
2013-12-10 17:05:42 +04:00
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
.PHONY: clean
|
2014-01-31 07:23:13 +04:00
|
|
|
|