Browse Source

Merge pull request #862 from r4sas/makefile

update Makefile, tunnels.conf, android platform
pull/865/head
R4SAS 7 years ago committed by GitHub
parent
commit
066374906e
  1. 2
      Makefile
  2. 8
      Makefile.homebrew
  3. 28
      Makefile.linux
  4. 35
      Makefile.mingw
  5. 1
      android/.gitignore
  6. 4
      android/jni/Application.mk
  7. 18
      contrib/tunnels.conf

2
Makefile

@ -78,7 +78,7 @@ obj/%.o: %.cpp
DAEMON_OBJS += $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) DAEMON_OBJS += $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC))
$(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT) $(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT)
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS) $(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)
$(SHLIB): $(patsubst %.cpp,obj/%.o,$(LIB_SRC)) $(SHLIB): $(patsubst %.cpp,obj/%.o,$(LIB_SRC))
ifneq ($(USE_STATIC),yes) ifneq ($(USE_STATIC),yes)

8
Makefile.homebrew

@ -9,9 +9,9 @@ LDFLAGS = -L${SSLROOT}/lib -L${BOOSTROOT}/lib
LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
ifeq ($(USE_UPNP),yes) ifeq ($(USE_UPNP),yes)
LDFLAGS += -ldl LDFLAGS += -ldl
CXXFLAGS += -DUSE_UPNP CXXFLAGS += -DUSE_UPNP
LDLIBS += -lminiupnpc LDLIBS += -lminiupnpc
endif endif
# OSX Notes # OSX Notes
@ -20,7 +20,7 @@ endif
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic # Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
# note from psi: 2009 macbook does not have aesni # note from psi: 2009 macbook does not have aesni
#ifeq ($(USE_AESNI),yes) #ifeq ($(USE_AESNI),yes)
# CXXFLAGS += -maes -DAESNI # CXXFLAGS += -maes -DAESNI
#endif #endif
# Disabled, since it will be the default make rule. I think its better # Disabled, since it will be the default make rule. I think its better

28
Makefile.linux

@ -31,27 +31,27 @@ ifeq ($(USE_STATIC),yes)
# NOTE: on glibc you will get this warning: # NOTE: on glibc you will get this warning:
# Using 'getaddrinfo' in statically linked applications requires at runtime # Using 'getaddrinfo' in statically linked applications requires at runtime
# the shared libraries from the glibc version used for linking # the shared libraries from the glibc version used for linking
LIBDIR := /usr/lib LIBDIR := /usr/lib
LDLIBS = $(LIBDIR)/libboost_system.a LDLIBS = $(LIBDIR)/libboost_system.a
LDLIBS += $(LIBDIR)/libboost_date_time.a LDLIBS += $(LIBDIR)/libboost_date_time.a
LDLIBS += $(LIBDIR)/libboost_filesystem.a LDLIBS += $(LIBDIR)/libboost_filesystem.a
LDLIBS += $(LIBDIR)/libboost_program_options.a LDLIBS += $(LIBDIR)/libboost_program_options.a
LDLIBS += $(LIBDIR)/libssl.a LDLIBS += $(LIBDIR)/libssl.a
LDLIBS += $(LIBDIR)/libcrypto.a LDLIBS += $(LIBDIR)/libcrypto.a
LDLIBS += $(LIBDIR)/libz.a LDLIBS += $(LIBDIR)/libz.a
LDLIBS += -lpthread -static-libstdc++ -static-libgcc -lrt -ldl LDLIBS += -lpthread -static-libstdc++ -static-libgcc -lrt -ldl
USE_AESNI := no USE_AESNI := no
else else
LDLIBS = -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread LDLIBS = -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
endif endif
# UPNP Support (miniupnpc 1.5 and higher) # UPNP Support (miniupnpc 1.5 and higher)
ifeq ($(USE_UPNP),yes) ifeq ($(USE_UPNP),yes)
CXXFLAGS += -DUSE_UPNP CXXFLAGS += -DUSE_UPNP
ifeq ($(USE_STATIC),yes) ifeq ($(USE_STATIC),yes)
LDLIBS += $(LIBDIR)/libminiupnpc.a LDLIBS += $(LIBDIR)/libminiupnpc.a
else else
LDLIBS += -lminiupnpc LDLIBS += -lminiupnpc
endif endif
endif endif

35
Makefile.mingw

@ -5,29 +5,28 @@ CXXFLAGS = -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN
NEEDED_CXXFLAGS = -std=c++11 NEEDED_CXXFLAGS = -std=c++11
BOOST_SUFFIX = -mt BOOST_SUFFIX = -mt
INCFLAGS = -I/usr/include/ -I/usr/local/include/ -I. -Idaemon INCFLAGS = -I/usr/include/ -I/usr/local/include/ -I. -Idaemon
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib LDFLAGS = -Wl,-rpath,/usr/local/lib -Wl,-Bstatic -static-libgcc -static-libstdc++ -L/usr/local/lib
# UPNP Support # UPNP Support
ifeq ($(USE_UPNP),yes) ifeq ($(USE_UPNP),yes)
CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB
LDLIBS = -Wl,-Bstatic -lminiupnpc LDLIBS = -lminiupnpc
endif endif
LDLIBS += \ LDLIBS += \
-Wl,-Bstatic -lboost_system$(BOOST_SUFFIX) \ -lboost_system$(BOOST_SUFFIX) \
-Wl,-Bstatic -lboost_date_time$(BOOST_SUFFIX) \ -lboost_date_time$(BOOST_SUFFIX) \
-Wl,-Bstatic -lboost_filesystem$(BOOST_SUFFIX) \ -lboost_filesystem$(BOOST_SUFFIX) \
-Wl,-Bstatic -lboost_program_options$(BOOST_SUFFIX) \ -lboost_program_options$(BOOST_SUFFIX) \
-Wl,-Bstatic -lssl \ -lssl \
-Wl,-Bstatic -lcrypto \ -lcrypto \
-Wl,-Bstatic -lz \ -lz \
-Wl,-Bstatic -lwsock32 \ -lwsock32 \
-Wl,-Bstatic -lws2_32 \ -lws2_32 \
-Wl,-Bstatic -lgdi32 \ -lgdi32 \
-Wl,-Bstatic -liphlpapi \ -liphlpapi \
-static-libgcc -static-libstdc++ \ -lstdc++ \
-Wl,-Bstatic -lstdc++ \ -lpthread
-Wl,-Bstatic -lpthread
ifeq ($(USE_WIN32_APP), yes) ifeq ($(USE_WIN32_APP), yes)
CXXFLAGS += -DWIN32_APP CXXFLAGS += -DWIN32_APP
@ -49,7 +48,7 @@ endif
ifeq ($(USE_ASLR),yes) ifeq ($(USE_ASLR),yes)
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va \ LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va \
-Wl,--dynamicbase,--export-all-symbols -Wl,--dynamicbase,--export-all-symbols
endif endif
obj/%.o : %.rc obj/%.o : %.rc

1
android/.gitignore vendored

@ -1,6 +1,7 @@
gen gen
tests tests
.idea .idea
ant.properties
local.properties local.properties
build.sh build.sh
bin bin

4
android/jni/Application.mk

@ -3,7 +3,7 @@
#APP_ABI := x86 #APP_ABI := x86
APP_ABI := armeabi-v7a APP_ABI := armeabi-v7a
#can be android-3 but will fail for x86 since arch-x86 is not present at ndkroot/platforms/android-3/ . libz is taken from there. #can be android-3 but will fail for x86 since arch-x86 is not present at ndkroot/platforms/android-3/ . libz is taken from there.
APP_PLATFORM := android-9 APP_PLATFORM := android-14
# http://stackoverflow.com/a/21386866/529442 http://stackoverflow.com/a/15616255/529442 to enable c++11 support in Eclipse # http://stackoverflow.com/a/21386866/529442 http://stackoverflow.com/a/15616255/529442 to enable c++11 support in Eclipse
NDK_TOOLCHAIN_VERSION := 4.9 NDK_TOOLCHAIN_VERSION := 4.9
@ -25,7 +25,7 @@ APP_OPTIM := debug
# git clone https://github.com/PurpleI2P/MiniUPnP-for-Android-Prebuilt.git # git clone https://github.com/PurpleI2P/MiniUPnP-for-Android-Prebuilt.git
# git clone https://github.com/PurpleI2P/android-ifaddrs.git # git clone https://github.com/PurpleI2P/android-ifaddrs.git
# change to your own # change to your own
I2PD_LIBS_PATH=/path/to/libraries I2PD_LIBS_PATH = /path/to/libraries
BOOST_PATH = $(I2PD_LIBS_PATH)/Boost-for-Android-Prebuilt BOOST_PATH = $(I2PD_LIBS_PATH)/Boost-for-Android-Prebuilt
OPENSSL_PATH = $(I2PD_LIBS_PATH)/OpenSSL-for-Android-Prebuilt OPENSSL_PATH = $(I2PD_LIBS_PATH)/OpenSSL-for-Android-Prebuilt
MINIUPNP_PATH = $(I2PD_LIBS_PATH)/MiniUPnP-for-Android-Prebuilt MINIUPNP_PATH = $(I2PD_LIBS_PATH)/MiniUPnP-for-Android-Prebuilt

18
contrib/tunnels.conf

@ -1,4 +1,4 @@
[IRC] [IRC-IRC2P]
type = client type = client
address = 127.0.0.1 address = 127.0.0.1
port = 6668 port = 6668
@ -6,6 +6,14 @@ destination = irc.postman.i2p
destinationport = 6667 destinationport = 6667
keys = irc-keys.dat keys = irc-keys.dat
#[IRC-ILITA]
#type = client
#address = 127.0.0.1
#port = 6669
#destination = irc.ilita.i2p
#destinationport = 6667
#keys = irc-keys.dat
#[SMTP] #[SMTP]
#type = client #type = client
#address = 127.0.0.1 #address = 127.0.0.1
@ -22,12 +30,4 @@ keys = irc-keys.dat
#destinationport = 110 #destinationport = 110
#keys = pop3-keys.dat #keys = pop3-keys.dat
#[MTN]
#type = client
#address = 127.0.0.1
#port = 8998
#destination = mtn.i2p-projekt.i2p
#destinationport = 4691
#keys = mtn-keys.dat
# see more examples in /usr/share/doc/i2pd/configuration.md.gz # see more examples in /usr/share/doc/i2pd/configuration.md.gz

Loading…
Cancel
Save