Browse Source

update makefiles, license year

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1583/head
R4SAS 4 years ago
parent
commit
bc330ff0ea
  1. 2
      LICENSE
  2. 5
      Makefile
  3. 16
      Makefile.linux
  4. 11
      Makefile.mingw
  5. 2
      Win32/Resource.rc2
  6. 2
      build/build_mingw.cmd
  7. 2
      contrib/android_binary_pack/build-archive
  8. 2
      contrib/android_binary_pack/i2pd
  9. 6
      libi2pd/FS.cpp
  10. 2
      libi2pd/Timestamp.cpp
  11. 12
      libi2pd/util.cpp
  12. 2
      qt/i2pd_qt/i2pd.rc

2
LICENSE

@ -1,4 +1,4 @@
Copyright (c) 2013-2015, The PurpleI2P Project Copyright (c) 2013-2020, The PurpleI2P Project
All rights reserved. All rights reserved.

5
Makefile

@ -54,7 +54,7 @@ NEEDED_CXXFLAGS += -MMD -MP -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR)
LIB_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_SRC)) LIB_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_SRC))
LIB_CLIENT_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_CLIENT_SRC)) LIB_CLIENT_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_CLIENT_SRC))
DAEMON_OBJS += $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) DAEMON_OBJS += $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC))
DEPS := $(LIB_OBJS:.o=.d) $(LIB_CLIENT_OBJS:.o=.d) $(DAEMON_OBJS:.o=.d) DEPS += $(LIB_OBJS:.o=.d) $(LIB_CLIENT_OBJS:.o=.d) $(DAEMON_OBJS:.o=.d)
all: mk_obj_dir $(ARLIB) $(ARLIB_CLIENT) $(I2PD) all: mk_obj_dir $(ARLIB) $(ARLIB_CLIENT) $(I2PD)
@ -82,7 +82,7 @@ obj/%.o: %.cpp
-include $(DEPS) -include $(DEPS)
$(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT) $(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT)
$(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
$(SHLIB): $(LIB_OBJS) $(SHLIB): $(LIB_OBJS)
ifneq ($(USE_STATIC),yes) ifneq ($(USE_STATIC),yes)
@ -130,3 +130,4 @@ doxygen:
.PHONY: api_client .PHONY: api_client
.PHONY: mk_obj_dir .PHONY: mk_obj_dir
.PHONY: install .PHONY: install
.PHONY: strip

16
Makefile.linux

@ -33,7 +33,7 @@ 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/$(SYS)
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
@ -41,20 +41,20 @@ ifeq ($(USE_STATIC),yes)
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 ifeq ($(USE_UPNP),yes)
USE_AESNI := no LDLIBS += $(LIBDIR)/libminiupnpc.a
endif
LDLIBS += -lpthread -ldl
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
ifeq ($(USE_UPNP),yes)
LDLIBS += -lminiupnpc
endif
endif endif
# UPNP Support (miniupnpc 1.5 and higher) # UPNP Support (miniupnpc 1.5 and higher)
ifeq ($(USE_UPNP),yes) ifeq ($(USE_UPNP),yes)
NEEDED_CXXFLAGS += -DUSE_UPNP NEEDED_CXXFLAGS += -DUSE_UPNP
ifeq ($(USE_STATIC),yes)
LDLIBS += $(LIBDIR)/libminiupnpc.a
else
LDLIBS += -lminiupnpc
endif
endif endif
ifeq ($(USE_AESNI),yes) ifeq ($(USE_AESNI),yes)

11
Makefile.mingw

@ -1,9 +1,11 @@
USE_WIN32_APP=yes # Build application with GUI (tray, main window)
CXX = g++ USE_WIN32_APP := yes
WINDRES = windres WINDRES = windres
CXXFLAGS := $(CXX_DEBUG) -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -fPIC -msse
CXXFLAGS := $(CXX_DEBUG) -D_MT -DWIN32_LEAN_AND_MEAN -fPIC -msse
INCFLAGS = -I$(DAEMON_SRC_DIR) -IWin32 INCFLAGS = -I$(DAEMON_SRC_DIR) -IWin32
LDFLAGS := ${LD_DEBUG} -Wl,-Bstatic -static-libgcc -static-libstdc++ LDFLAGS := ${LD_DEBUG} -Wl,-Bstatic -static-libgcc
# detect proper flag for c++11 support by compilers # detect proper flag for c++11 support by compilers
CXXVER := $(shell $(CXX) -dumpversion) CXXVER := $(shell $(CXX) -dumpversion)
@ -38,7 +40,6 @@ LDLIBS += \
-liphlpapi \ -liphlpapi \
-lole32 \ -lole32 \
-luuid \ -luuid \
-lstdc++ \
-lpthread -lpthread
ifeq ($(USE_WIN32_APP), yes) ifeq ($(USE_WIN32_APP), yes)

2
Win32/Resource.rc2

@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "C++ I2P daemon" VALUE "FileDescription", "C++ I2P daemon"
VALUE "FileVersion", I2PD_VERSION VALUE "FileVersion", I2PD_VERSION
VALUE "InternalName", CODENAME VALUE "InternalName", CODENAME
VALUE "LegalCopyright", "Copyright (C) 2013-2017, The PurpleI2P Project" VALUE "LegalCopyright", "Copyright (C) 2013-2020, The PurpleI2P Project"
VALUE "OriginalFilename", "i2pd" VALUE "OriginalFilename", "i2pd"
VALUE "ProductName", "Purple I2P" VALUE "ProductName", "Purple I2P"
VALUE "ProductVersion", I2P_VERSION VALUE "ProductVersion", I2P_VERSION

2
build/build_mingw.cmd

@ -2,7 +2,7 @@
setlocal enableextensions enabledelayedexpansion setlocal enableextensions enabledelayedexpansion
title Building i2pd title Building i2pd
REM Copyright (c) 2013-2017, The PurpleI2P Project REM Copyright (c) 2013-2020, The PurpleI2P Project
REM This file is part of Purple i2pd project and licensed under BSD3 REM This file is part of Purple i2pd project and licensed under BSD3
REM See full license text in LICENSE file at top of project tree REM See full license text in LICENSE file at top of project tree

2
contrib/android_binary_pack/build-archive

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Copyright (c) 2013-2017, The PurpleI2P Project # Copyright (c) 2013-2020, The PurpleI2P Project
# #
# This file is part of Purple i2pd project and licensed under BSD3 # This file is part of Purple i2pd project and licensed under BSD3
# #

2
contrib/android_binary_pack/i2pd

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright (c) 2013-2019, The PurpleI2P Project # Copyright (c) 2013-2020, The PurpleI2P Project
# #
# This file is part of Purple i2pd project and licensed under BSD3 # This file is part of Purple i2pd project and licensed under BSD3
# #

6
libi2pd/FS.cpp

@ -46,13 +46,13 @@ namespace fs {
dataDir = cmdline_param; dataDir = cmdline_param;
return; return;
} }
#if defined(WIN32) || defined(_WIN32) #ifdef _WIN32
char localAppData[MAX_PATH]; char localAppData[MAX_PATH];
// check executable directory first // check executable directory first
if(!GetModuleFileName(NULL, localAppData, MAX_PATH)) if(!GetModuleFileName(NULL, localAppData, MAX_PATH))
{ {
#if defined(WIN32_APP) #ifdef WIN32_APP
MessageBox(NULL, TEXT("Unable to get application path!"), TEXT("I2Pd: error"), MB_ICONERROR | MB_OK); MessageBox(NULL, TEXT("Unable to get application path!"), TEXT("I2Pd: error"), MB_ICONERROR | MB_OK);
#else #else
fprintf(stderr, "Error: Unable to get application path!"); fprintf(stderr, "Error: Unable to get application path!");
@ -70,7 +70,7 @@ namespace fs {
{ {
if(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, localAppData) != S_OK) if(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, localAppData) != S_OK)
{ {
#if defined(WIN32_APP) #ifdef WIN32_APP
MessageBox(NULL, TEXT("Unable to get AppData path!"), TEXT("I2Pd: error"), MB_ICONERROR | MB_OK); MessageBox(NULL, TEXT("Unable to get AppData path!"), TEXT("I2Pd: error"), MB_ICONERROR | MB_OK);
#else #else
fprintf(stderr, "Error: Unable to get AppData path!"); fprintf(stderr, "Error: Unable to get AppData path!");

2
libi2pd/Timestamp.cpp

@ -19,7 +19,7 @@
#include "I2PEndian.h" #include "I2PEndian.h"
#include "Timestamp.h" #include "Timestamp.h"
#ifdef WIN32 #ifdef _WIN32
#ifndef _WIN64 #ifndef _WIN64
#define _USE_32BIT_TIME_T #define _USE_32BIT_TIME_T
#endif #endif

12
libi2pd/util.cpp

@ -13,7 +13,7 @@
#include "util.h" #include "util.h"
#include "Log.h" #include "Log.h"
#ifdef WIN32 #ifdef _WIN32
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
@ -56,7 +56,7 @@ int inet_pton_xp(int af, const char *src, void *dst)
} }
return 0; return 0;
} }
#else /* !WIN32 => UNIX */ #else /* !_WIN32 => UNIX */
#include <sys/types.h> #include <sys/types.h>
#include <ifaddrs.h> #include <ifaddrs.h>
#endif #endif
@ -109,7 +109,7 @@ namespace util
namespace net namespace net
{ {
#ifdef WIN32 #ifdef _WIN32
bool IsWindowsXPorLater() bool IsWindowsXPorLater()
{ {
static bool isRequested = false; static bool isRequested = false;
@ -333,13 +333,13 @@ namespace net
return mtu; return mtu;
} }
#endif // WIN32 #endif // _WIN32
int GetMTU(const boost::asio::ip::address& localAddress) int GetMTU(const boost::asio::ip::address& localAddress)
{ {
int fallback = localAddress.is_v6 () ? 1280 : 620; // fallback MTU int fallback = localAddress.is_v6 () ? 1280 : 620; // fallback MTU
#ifdef WIN32 #ifdef _WIN32
return GetMTUWindows(localAddress, fallback); return GetMTUWindows(localAddress, fallback);
#else #else
return GetMTUUnix(localAddress, fallback); return GetMTUUnix(localAddress, fallback);
@ -349,7 +349,7 @@ namespace net
const boost::asio::ip::address GetInterfaceAddress(const std::string & ifname, bool ipv6) const boost::asio::ip::address GetInterfaceAddress(const std::string & ifname, bool ipv6)
{ {
#ifdef WIN32 #ifdef _WIN32
LogPrint(eLogError, "NetIface: cannot get address by interface name, not implemented on WIN32"); LogPrint(eLogError, "NetIface: cannot get address by interface name, not implemented on WIN32");
if(ipv6) if(ipv6)
return boost::asio::ip::address::from_string("::1"); return boost::asio::ip::address::from_string("::1");

2
qt/i2pd_qt/i2pd.rc

@ -17,7 +17,7 @@ BEGIN
VALUE "FileDescription", "I2Pd Qt" VALUE "FileDescription", "I2Pd Qt"
VALUE "FileVersion", I2PD_VERSION VALUE "FileVersion", I2PD_VERSION
VALUE "InternalName", "i2pd-qt" VALUE "InternalName", "i2pd-qt"
VALUE "LegalCopyright", "Copyright (C) 2013-2018, The PurpleI2P Project" VALUE "LegalCopyright", "Copyright (C) 2013-2020, The PurpleI2P Project"
VALUE "LegalTrademarks1", "Distributed under the BSD 3-Clause software license, see the accompanying file COPYING or https://opensource.org/licenses/BSD-3-Clause." VALUE "LegalTrademarks1", "Distributed under the BSD 3-Clause software license, see the accompanying file COPYING or https://opensource.org/licenses/BSD-3-Clause."
VALUE "OriginalFilename", "i2pd_qt.exe" VALUE "OriginalFilename", "i2pd_qt.exe"
VALUE "ProductName", "i2pd-qt" VALUE "ProductName", "i2pd-qt"

Loading…
Cancel
Save