Skip to content

Commit

Permalink
update makefiles, license year
Browse files Browse the repository at this point in the history
Signed-off-by: R4SAS <r4sas@i2pmail.org>
  • Loading branch information
r4sas committed Nov 22, 2020
1 parent 771480e commit bc330ff
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 35 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2013-2015, The PurpleI2P Project
Copyright (c) 2013-2020, The PurpleI2P Project

All rights reserved.

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -130,3 +130,4 @@ doxygen:
.PHONY: api_client
.PHONY: mk_obj_dir
.PHONY: install
.PHONY: strip
16 changes: 8 additions & 8 deletions Makefile.linux
Expand Up @@ -33,28 +33,28 @@ 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
LDLIBS += $(LIBDIR)/libboost_program_options.a
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)
Expand Down
11 changes: 6 additions & 5 deletions Makefile.mingw
@@ -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)
Expand Down Expand Up @@ -38,7 +40,6 @@ LDLIBS += \
-liphlpapi \
-lole32 \
-luuid \
-lstdc++ \
-lpthread

ifeq ($(USE_WIN32_APP), yes)
Expand Down
2 changes: 1 addition & 1 deletion Win32/Resource.rc2
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/build_mingw.cmd
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion contrib/android_binary_pack/build-archive
@@ -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
#
Expand Down
10 changes: 5 additions & 5 deletions contrib/android_binary_pack/i2pd
@@ -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
#
Expand All @@ -21,13 +21,13 @@ arch=$(uname -m)

screenfind=$(which screen)
if [ -z $screenfind ]; then
echo "Can't find 'screen' installed. That script needs it!";
exit 1;
echo "Can't find 'screen' installed. That script needs it!";
exit 1;
fi

if [ -z i2pd-$arch ]; then
echo "Can't find i2pd binary for your archtecture.";
exit 1;
echo "Can't find i2pd binary for your archtecture.";
exit 1;
fi

screen -AmdS i2pd ./i2pd-$arch --datadir=$DIR
6 changes: 3 additions & 3 deletions libi2pd/FS.cpp
Expand Up @@ -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!");
Expand All @@ -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!");
Expand Down
2 changes: 1 addition & 1 deletion libi2pd/Timestamp.cpp
Expand Up @@ -19,7 +19,7 @@
#include "I2PEndian.h"
#include "Timestamp.h"

#ifdef WIN32
#ifdef _WIN32
#ifndef _WIN64
#define _USE_32BIT_TIME_T
#endif
Expand Down
12 changes: 6 additions & 6 deletions libi2pd/util.cpp
Expand Up @@ -13,7 +13,7 @@
#include "util.h"
#include "Log.h"

#ifdef WIN32
#ifdef _WIN32
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -109,7 +109,7 @@ namespace util

namespace net
{
#ifdef WIN32
#ifdef _WIN32
bool IsWindowsXPorLater()
{
static bool isRequested = false;
Expand Down Expand Up @@ -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);
Expand All @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion qt/i2pd_qt/i2pd.rc
Expand Up @@ -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"
Expand Down

0 comments on commit bc330ff

Please sign in to comment.