Merge branch 'IPS-100'

IPS-165
Marcel Schneider 1 year ago
commit 5a18fe3ce1

5
.gitignore vendored

@ -1,4 +1,5 @@
##GNUstep
# pEp build config
local.conf
### Pre Compiled Headers
*.d
@ -7,6 +8,8 @@
### Artefacts
*.so*
*.a
*.o
###
obj/

@ -1,44 +0,0 @@
#
# Dox: http://www.gnustep.org/resources/documentation/make_1.html
#
# To Run: `make install messages=yes shared=no debug=yes
#
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
LIBRARY_NAME = pEpObjCAdapterProtocols
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
FLAGS_FOR_PRECOMPILED_HEADER_RELEASE="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O2 -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
ifeq ($(debug), yes)
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_DEBUG}
else
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_RELEASE}
endif
SHELL_RESULT := $(shell ${GNUSTEPHELPER_DIR}/build-precompiled-header.sh ${FLAGS_FOR_PRECOMPILED_HEADER})
# Header Search Paths
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := -I../../../PEPObjCTypes/PEPObjCTypes/PublicHeaders/
pEpObjCAdapterProtocols_INCLUDE_DIRS = -I../PublicHeaders/ ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED}
# SRC Files
ALL_DOT_M_FILES := $(shell find ../ -type f -name "*.m")
pEpObjCAdapterProtocols_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCAdapterProtocols_RESOURCE_FILES =
# Build Settings
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC
pEpObjCAdapterProtocols_HEADER_FILES_INSTALL_DIR = build/include
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

@ -0,0 +1,19 @@
# Content of this library
TARGET = libPEPObjCAdapterProtocols
OBJECTS = $(call find-objects,..)
DEPFILES = $(call find-deps,..)
HEADERS = $(call find-headers,../PublicHeaders/)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
$(call find-includes,..)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS =
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

@ -1,49 +0,0 @@
#
# Dox: http://www.gnustep.org/resources/documentation/make_1.html
#
# To Run: `make install messages=yes shared=no debug=yes
#
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
LIBRARY_NAME = pEpObjCTypeUtils
# Build Dependencies ...
SHELL_RESULT := $(shell ./build-dependencies.sh)
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
FLAGS_FOR_PRECOMPILED_HEADER_RELEASE="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O2 -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
ifeq ($(debug), yes)
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_DEBUG}
else
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_RELEASE}
endif
SHELL_RESULT := $(shell ${GNUSTEPHELPER_DIR}/build-precompiled-header.sh ${FLAGS_FOR_PRECOMPILED_HEADER})
# Keep. Useful to manually figure out flags for precompiled header.
#pEpObjCTypeUtils_OBJC_PRECOMPILED_HEADERS = PEPObjCGNUStepOptimizations.h
# Finds all dirs containing headers and prefixes with "-I"
ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED := $(shell find ~/local/include/ -type d | sed -e 's/^/-I/;')
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := $(shell find ../../../PEPObjCTypes/PEPObjCTypes/PublicHeaders/ -type d | sed -e 's/^/-I/;')
pEpObjCTypeUtils_INCLUDE_DIRS = -I../PublicHeaders/ ${ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED}
ALL_DOT_M_FILES := $(shell find ../ -type f -name "*.m")
pEpObjCTypeUtils_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCTypeUtils_RESOURCE_FILES =
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC
HEADER_FILES_INSTALL_DIR = build
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

@ -0,0 +1,28 @@
root = ../../../../
# Content of this library
TARGET = libPEPObjCTypeUtils
OBJECTS = $(call find-objects,..)
DEPFILES = $(call find-deps,..)
HEADERS = $(call find-headers,../PublicHeaders)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
# PEP_INCLUDE is the pEp/ folder (since we don't prefix headers here), PEP_SRC
# is the engine source directory, since we may use uninstalled headers.
INCLUDES = \
-I$(PEP_INCLUDE) \
$(call find-includes,..)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS = -lpEpEngine -lasn1 -lPEPObjCTypes
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
print:
echo $(OBJECTS)
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

@ -1,44 +0,0 @@
#
# Dox: http://www.gnustep.org/resources/documentation/make_1.html
#
# To Run: `make messages=yes shared=no debug=yes`
#
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
LIBRARY_NAME = pEpObjCTypes
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
FLAGS_FOR_PRECOMPILED_HEADER_RELEASE="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O2 -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
ifeq ($(debug), yes)
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_DEBUG}
else
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_RELEASE}
endif
SHELL_RESULT := $(shell ${GNUSTEPHELPER_DIR}/build-precompiled-header.sh ${FLAGS_FOR_PRECOMPILED_HEADER})
# Keep. Useful to manually figure out flags for precompiled header.
#pEpObjCTypes_OBJC_PRECOMPILED_HEADERS = PEPObjCGNUStepOptimizations.h
# Finds all dirs in src and prefixes with "-I"
ALL_PRIVATE_HEADER_DIRS_PREFIXED := $(shell find ../src/ -type d | sed -e 's/^/-I/;')
pEpObjCTypes_INCLUDE_DIRS = -I../PublicHeaders/ ${ALL_PRIVATE_HEADER_DIRS_PREFIXED}
ALL_DOT_M_FILES := $(shell find ../src/ -type f | grep .m)
pEpObjCTypes_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCTypes_RESOURCE_FILES =
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC
HEADER_FILES_INSTALL_DIR = build
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

@ -0,0 +1,20 @@
# Content of this library
TARGET = libPEPObjCTypes
OBJECTS = $(call find-objects,../src)
DEPFILES = $(call find-deps,../src)
HEADERS = $(call find-headers,../PublicHeaders/)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
-I../PublicHeaders \
$(call find-includes,..)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS =
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

@ -1,57 +0,0 @@
#
# Dox: http://www.gnustep.org/resources/documentation/make_1.html
#
# To Run: `make messages=yes shared=no debug=yes
#
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
# Build Dependencies
SHELL_RESULT := $(shell ./build-dependencies.sh)
LIBRARY_NAME = pEpObjCAdapter
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-pthread -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
FLAGS_FOR_PRECOMPILED_HEADER_RELEASE="-pthread -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O2 -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
ifeq ($(debug), yes)
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_DEBUG}
else
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_RELEASE}
endif
SHELL_RESULT := $(shell ${GNUSTEPHELPER_DIR}/build-precompiled-header.sh ${FLAGS_FOR_PRECOMPILED_HEADER})
# Keep. Useful to manually figure out flags for precompiled header.
# pEpObjCAdapter_OBJC_PRECOMPILED_HEADERS = PEPObjCGNUStepOptimizations.h
# Header Search Paths
#Finds all dirs containing headers and prefixes with "-I"
ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED := $(shell find ~/local/include/ -type d | sed -e 's/^/-I/;')
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := -I../../Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/
PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED := -I../../Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/
PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED := -I../../Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders/
PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED := $(shell find ../../pEpObjCAdapter/ -type d | sed -e 's/^/-I/;')
pEpObjCAdapter_INCLUDE_DIRS = ${PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED} ${ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED} ${PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED}
# SRC Files
ALL_DOT_M_FILES := $(shell find ../ -type f -name "*.m")
pEpObjCAdapter_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCAdapter_RESOURCE_FILES =
# Build Settings
pEpObjCAdapter_LDFLAGS = ../../Subprojects/PEPObjCTypes/PEPObjCTypes/build-linux/build/libpEpObjCTypes.a ../../Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/build-linux/build/libpEpObjCTypeUtils.a ../../Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/build-linux/build/libpEpObjCAdapterProtocols.a
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O0
HEADER_FILES_INSTALL_DIR = build
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

@ -0,0 +1,27 @@
root = ../../
# Content of this library
TARGET = libpEpObjCAdapter
OBJECTS = $(patsubst %.m,%.o,$(wildcard ../*.m ../*/*.m))
DEPFILES = $(call find-deps,..)
HEADERS = $(call find-headers,../PublicHeaders/)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
-I$(root)/pEpObjCAdapter/PublicHeaders \
-I$(root)/pEpObjCAdapter/Extensions \
-I$(root)/pEpObjCAdapter \
-I$(root)/Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders \
-I$(root)/Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders \
-I$(root)/Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders \
-I$(PEP_INCLUDE)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS = -lpEpEngine -Wl,--whole-archive -lPEPObjCTypes -lPEPObjCTypeUtils -lPEPObjCAdapterProtocols -Wl,--no-whole-archive
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

@ -1,72 +0,0 @@
#
# An example GNUmakefile
#
# To Run: `make messages=yes
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
#include $(GNUSTEP_MAKEFILES)/rules.make
#######################################
# Sampel Excecutable Using PEPObjCAdapter
#######################################
# Build Dependencies
SHELL_RESULT := $(shell ./build-dependencies.sh)
TOOL_NAME = ClientOfObjcAdapter
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-pthread -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
FLAGS_FOR_PRECOMPILED_HEADER_RELEASE="-pthread -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O2 -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
ifeq ($(debug), yes)
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_DEBUG}
else
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_RELEASE}
endif
SHELL_RESULT := $(shell ${GNUSTEPHELPER_DIR}/build-precompiled-header.sh ${FLAGS_FOR_PRECOMPILED_HEADER})
# Keep. Useful to manually figure out flags for precompiled header.
#pEpObjCAdapter_OBJC_PRECOMPILED_HEADERS = ${GNUSTEPHELPER_DIR}/PEPObjCGNUStepOptimizations.h
# Header Search Paths
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := -I../../../Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/
PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED := -I../../../Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/
PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED := -I../../../Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders/
PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED := $(shell find ../../../pEpObjCAdapter/ -type d | sed -e 's/^/-I/;')
CLIENT_OF_OBJC_ADAPTER_HEADER_DIRS_PREFIXED := $(shell find ../ -type d | sed -e 's/^/-I/;')
ClientOfObjcAdapter_INCLUDE_DIRS = ${CLIENT_OF_OBJC_ADAPTER_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED} ${PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED} ${PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED}
# SRC Files
ALL_DOT_M_FILES := $(shell find . -type f -name "*.m")
ClientOfObjcAdapter_OBJC_FILES = main.m
ClientOfObjcAdapter_RESOURCE_FILES =
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_FLAGS += -fobjc-runtime=gnustep-2.0 -fobjc-arc
## Linking Libs - Take Care !! The Order *DOES* Matter
ADDITIONAL_OBJC_LIBS = -ldispatch \
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCAdapter.so \
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCAdapterProtocols.a \
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCTypeUtils.a\
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCTypes.a \
-l${HOME}/local/lib/libpEpEngine.a \
-luuid \
-lz \
-l${HOME}/local/lib/libetpan.a \
-l${HOME}/local/lib/libasn1.a \
-l${HOME}/local/lib/libsqlite3.a \
-lpthread \
-ldl \
-l${HOME}/local/lib/libsequoia_openpgp_ffi.a \
-l${HOME}/local/lib/libhogweed.a \
-l${HOME}/local/lib/libnettle.a \
-l${HOME}/local/lib/libgmp.a
# -l/usr/GNUstep/Local/Library/Libraries/libpEpObjCAdapter.a\
ADDITIONAL_LDFLAGS += -L/usr/GNUstep/Local/Library/Libraries
include $(GNUSTEP_MAKEFILES)/tool.make

@ -0,0 +1,39 @@
root = ../../../
# Content of this library
TARGET_EXE = test_project
OBJECTS = $(call find-objects,.)
DEPFILES = $(call find-deps,.)
HEADERS =
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
-I$(root)/pEpObjCAdapter/PublicHeaders
# Since we link an excecuatble here, these options matter a lot. We also need
# to list all transitive dependincies if we want to link statically.
# ObjC stuff needs to be linked with --whole-archive to mae Extensions work.
# Otherwise, we link "our" dependencies with -Bstatic to perfer static linking,
# but allow dynamic linking in the end for system stuff.
LIBS = \
-Wl,-Bstatic \
-Wl,--whole-archive \
-lpEpObjCAdapter \
-lPEPObjCTypes \
-lPEPObjCTypeUtils \
-lPEPObjCAdapterProtocols \
-Wl,--no-whole-archive \
-lpEpEngine -lasn1 -lsqlite3 -letpan -liconv -luuid \
-lsequoia_openpgp_ffi -lhogweed -lnettle -lgmp -lbz2 \
-Wl,-Bdynamic \
-ldl # dlsym is needed by some rust thing in sequoia.
# Default rule, to build the executable instead of libraries.
all: $(TARGET_EXE)
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)
Loading…
Cancel
Save