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 @@ @@ -1,4 +1,4 @@
Copyright (c) 2013-2015, The PurpleI2P Project
Copyright (c) 2013-2020, The PurpleI2P Project
All rights reserved.

5
Makefile

@ -54,7 +54,7 @@ NEEDED_CXXFLAGS += -MMD -MP -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR) @@ -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_CLIENT_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_CLIENT_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)
@ -82,7 +82,7 @@ obj/%.o: %.cpp @@ -82,7 +82,7 @@ obj/%.o: %.cpp
-include $(DEPS)
$(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT)
$(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
$(SHLIB): $(LIB_OBJS)
ifneq ($(USE_STATIC),yes)
@ -130,3 +130,4 @@ doxygen: @@ -130,3 +130,4 @@ doxygen:
.PHONY: api_client
.PHONY: mk_obj_dir
.PHONY: install
.PHONY: strip

16
Makefile.linux

@ -33,7 +33,7 @@ ifeq ($(USE_STATIC),yes) @@ -33,7 +33,7 @@ ifeq ($(USE_STATIC),yes)
# NOTE: on glibc you will get this warning:
# Using 'getaddrinfo' in statically linked applications requires at runtime
# 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_date_time.a
LDLIBS += $(LIBDIR)/libboost_filesystem.a
@ -41,20 +41,20 @@ ifeq ($(USE_STATIC),yes) @@ -41,20 +41,20 @@ ifeq ($(USE_STATIC),yes)
LDLIBS += $(LIBDIR)/libssl.a
LDLIBS += $(LIBDIR)/libcrypto.a
LDLIBS += $(LIBDIR)/libz.a
LDLIBS += -lpthread -static-libstdc++ -static-libgcc -lrt -ldl
USE_AESNI := no
ifeq ($(USE_UPNP),yes)
LDLIBS += $(LIBDIR)/libminiupnpc.a
endif
LDLIBS += -lpthread -ldl
else
LDLIBS += -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
ifeq ($(USE_UPNP),yes)
LDLIBS += -lminiupnpc
endif
endif
# UPNP Support (miniupnpc 1.5 and higher)
ifeq ($(USE_UPNP),yes)
NEEDED_CXXFLAGS += -DUSE_UPNP
ifeq ($(USE_STATIC),yes)
LDLIBS += $(LIBDIR)/libminiupnpc.a
else
LDLIBS += -lminiupnpc
endif
endif
ifeq ($(USE_AESNI),yes)

11
Makefile.mingw

@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
USE_WIN32_APP=yes
CXX = g++
# Build application with GUI (tray, main window)
USE_WIN32_APP := yes
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
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
CXXVER := $(shell $(CXX) -dumpversion)
@ -38,7 +40,6 @@ LDLIBS += \ @@ -38,7 +40,6 @@ LDLIBS += \
-liphlpapi \
-lole32 \
-luuid \
-lstdc++ \
-lpthread
ifeq ($(USE_WIN32_APP), yes)

2
Win32/Resource.rc2

@ -25,7 +25,7 @@ BEGIN @@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "C++ I2P daemon"
VALUE "FileVersion", I2PD_VERSION
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 "ProductName", "Purple I2P"
VALUE "ProductVersion", I2P_VERSION

2
build/build_mingw.cmd

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
setlocal enableextensions enabledelayedexpansion
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 See full license text in LICENSE file at top of project tree

2
contrib/android_binary_pack/build-archive

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/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
#

2
contrib/android_binary_pack/i2pd

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/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
#

6
libi2pd/FS.cpp

@ -46,13 +46,13 @@ namespace fs { @@ -46,13 +46,13 @@ namespace fs {
dataDir = cmdline_param;
return;
}
#if defined(WIN32) || defined(_WIN32)
#ifdef _WIN32
char localAppData[MAX_PATH];
// check executable directory first
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);
#else
fprintf(stderr, "Error: Unable to get application path!");
@ -70,7 +70,7 @@ namespace fs { @@ -70,7 +70,7 @@ namespace fs {
{
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);
#else
fprintf(stderr, "Error: Unable to get AppData path!");

2
libi2pd/Timestamp.cpp

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

12
libi2pd/util.cpp

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

2
qt/i2pd_qt/i2pd.rc

@ -17,7 +17,7 @@ BEGIN @@ -17,7 +17,7 @@ BEGIN
VALUE "FileDescription", "I2Pd Qt"
VALUE "FileVersion", I2PD_VERSION
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 "OriginalFilename", "i2pd_qt.exe"
VALUE "ProductName", "i2pd-qt"

Loading…
Cancel
Save