Browse Source

autobuild i2psam from daemon makefile

pull/16/head
R4SAS 8 years ago
parent
commit
f6f68b6277
  1. 2
      i2psam/makefile.mingw
  2. 17
      src/makefile.mingw
  3. 13
      src/makefile.unix

2
i2psam/makefile.mingw

@ -1,6 +1,6 @@
############################################################################# #############################################################################
# Makefile for building: libi2psam.a # Makefile for building: libi2psam.a
# make -f makefile.unix # make -f makefile.mingw
############################################################################# #############################################################################
####### Compiler, tools and options ####### Compiler, tools and options

17
src/makefile.mingw

@ -60,19 +60,16 @@ TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
ifneq (${USE_IPV6}, -) ifneq (${USE_IPV6}, -)
DEFS += -DUSE_IPV6=$(USE_IPV6) DEFS += -DUSE_IPV6=$(USE_IPV6)
endif endif
LIBS += -l stdc++ -l mingwthrd -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi -l pthread LIBS += -l stdc++ -l mingwthrd -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi -l pthread
# I2P Support
DEFS += -DUSE_NATIVE_I2P -I"../i2psam"
LIBS += -L"../i2psam"
# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are # TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
HEADERS = $(wildcard *.h) HEADERS = $(wildcard *.h)
OBJS= \ OBJS= \
../i2psam/libi2psam.a \
leveldb/libleveldb.a \ leveldb/libleveldb.a \
obj/alert.o \ obj/alert.o \
obj/version.o \ obj/version.o \
@ -105,7 +102,7 @@ OBJS= \
obj/noui.o \ obj/noui.o \
obj/leveldb.o \ obj/leveldb.o \
obj/txdb.o \ obj/txdb.o \
obj/Gost.o obj/Gost.o
ifdef USE_SSE2 ifdef USE_SSE2
DEFS += -DUSE_SSE2 DEFS += -DUSE_SSE2
@ -127,6 +124,13 @@ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
leveldb/libleveldb.a: leveldb/libleveldb.a:
cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(CFLAGS)" TARGET_OS=NATIVE_WINDOWS libleveldb.a libmemenv.a && cd .. cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(CFLAGS)" TARGET_OS=NATIVE_WINDOWS libleveldb.a libmemenv.a && cd ..
# I2P Support
DEFS += -DUSE_NATIVE_I2P -I"../i2psam"
LIBS += -L"../i2psam"
../i2psam/libi2psam.a:
cd ../i2psam && $(MAKE) -f makefile.mingw && cd ../src
obj/%-sse2.o: %-sse2.cpp obj/%-sse2.o: %-sse2.cpp
$(CXX) -c $(CFLAGS) -msse2 -mstackrealign -o $@ $< $(CXX) -c $(CFLAGS) -msse2 -mstackrealign -o $@ $<
@ -149,5 +153,6 @@ clean:
rm -f obj/* rm -f obj/*
rm -f obj-test/* rm -f obj-test/*
cd leveldb && $(MAKE) TARGET_OS=NATIVE_WINDOWS clean && cd .. cd leveldb && $(MAKE) TARGET_OS=NATIVE_WINDOWS clean && cd ..
cd ../i2psam && $(MAKE) -f makefile.mingw clean && cd ../src
FORCE: FORCE:

13
src/makefile.unix

@ -52,10 +52,6 @@ LIBS+= \
-l pthread \ -l pthread \
-l i2psam -l i2psam
# I2P Support
DEFS += -DUSE_NATIVE_I2P -I"../i2psam"
LIBS += -L"../i2psam"
# Hardening # Hardening
# Make some classes of vulnerabilities unexploitable in case one is discovered. # Make some classes of vulnerabilities unexploitable in case one is discovered.
# #
@ -102,6 +98,7 @@ xCXXFLAGS=-std=c++11 -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-
xLDFLAGS=$(LDHARDENING) $(LDFLAGS) xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
OBJS= \ OBJS= \
../i2psam/libi2psam.a \
leveldb/libleveldb.a \ leveldb/libleveldb.a \
obj/alert.o \ obj/alert.o \
obj/version.o \ obj/version.o \
@ -114,7 +111,7 @@ OBJS= \
obj/init.o \ obj/init.o \
obj/keystore.o \ obj/keystore.o \
obj/i2p.o \ obj/i2p.o \
obj/Gost.o \ obj/Gost.o \
obj/main.o \ obj/main.o \
obj/net.o \ obj/net.o \
obj/protocol.o \ obj/protocol.o \
@ -158,6 +155,12 @@ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
leveldb/libleveldb.a: leveldb/libleveldb.a:
@echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd .. @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
# I2P Support
LIBS += -L"../i2psam"
DEFS += -DUSE_NATIVE_I2P -I"../i2psam"
../i2psam/libi2psam.a:
@echo "Building libi2psam ..." && cd ../i2psam && $(MAKE) -f makefile.unix && cd ../src
# auto-generated dependencies: # auto-generated dependencies:
-include obj/*.P -include obj/*.P
-include obj-test/*.P -include obj-test/*.P

Loading…
Cancel
Save