Browse Source

ENGINE-864: compiles on debian now

ENGINE-864
Krista Bennett 9 months ago
parent
commit
73136bff28
2 changed files with 22 additions and 18 deletions
  1. +15
    -15
      Makefile.conf
  2. +7
    -3
      pEpMIME/Makefile

+ 15
- 15
Makefile.conf View File

@ -93,10 +93,10 @@ TARGET_ARCH=
# The following two variables will be appended to.
# You can thus not set them to a final, fixed value here.
ifeq ($(BUILD_FOR),Linux)
LDFLAGS=
LDFLAGS+=
else ifeq ($(BUILD_FOR),Darwin)
# "-bind_at_load" helps find symbol resolution errors faster
LDFLAGS=-bind_at_load
LDFLAGS+=-bind_at_load
endif
LDLIBS=
@ -112,9 +112,9 @@ else ifeq ($(BUILD_FOR),Darwin)
endif
ifeq ($(BUILD_FOR),Linux)
CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=auto
CFLAGS+=-fPIC -fstrict-aliasing -fdiagnostics-color=auto
else ifeq ($(BUILD_FOR),Darwin)
CFLAGS=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
CFLAGS+=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
endif
# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
@ -176,7 +176,7 @@ endif
# The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
# The tests do not work properly, if compiled with -DNDEBUG
ifeq ($(BUILD_FOR),Linux)
CXXFLAGS=-fdiagnostics-color=auto -I../src -I../asn.1 $(ETPAN_INC)
CXXFLAGS+=-fdiagnostics-color=auto -I../src -I../asn.1 $(ETPAN_INC)
ifdef WARN
CXXFLAGS+=
else
@ -188,7 +188,7 @@ ifeq ($(BUILD_FOR),Linux)
CXXFLAGS+= -O3 -DNDEBUG
endif
else ifeq ($(BUILD_FOR),Darwin)
CXXFLAGS=-pthread -fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
CXXFLAGS+=-pthread -fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
ifdef WARN
CXXFLAGS+=
else
@ -207,10 +207,10 @@ endif
######### C and C++ #########
ifeq ($(BUILD_FOR),Darwin)
CPPFLAGS=-D_DARWIN_C_SOURCE
CXXFLAGS=-D_DARWIN_C_SOURCE
CPPFLAGS+=-D_DARWIN_C_SOURCE
CXXFLAGS+=-D_DARWIN_C_SOURCE
else
CPPFLAGS=
LDLIBS+=-luuid
endif
@ -242,8 +242,8 @@ SQLITE3_FROM_OS=placeholder
OPENPGP=SEQUOIA
# Sequoia-specific variables
SEQUOIA_CFLAGS=
SEQUOIA_LDFLAGS=
SEQUOIA_CFLAGS+=
SEQUOIA_LDFLAGS+=
SEQUOIA_LIB=
SEQUOIA_INC=
@ -282,10 +282,10 @@ endif
# For now: set if has no value.
ifeq ($(OPENPGP),SEQUOIA)
ifeq ($(SEQUOIA_CFLAGS),)
SEQUOIA_CFLAGS=$(shell pkg-config --cflags-only-other sequoia-openpgp)
SEQUOIA_CFLAGS+=$(shell pkg-config --cflags-only-other sequoia-openpgp)
endif
ifeq ($(SEQUOIA_LDFLAGS),)
SEQUOIA_LDFLAGS=$(shell pkg-config --libs-only-L --libs-only-other sequoia-openpgp)
SEQUOIA_LDFLAGS+=$(shell pkg-config --libs-only-L --libs-only-other sequoia-openpgp)
endif
ifeq ($(SEQUOIA_LIB),)
SEQUOIA_LIB=$(shell pkg-config --libs-only-l sequoia-openpgp)
@ -304,8 +304,8 @@ ifdef PEP_MIME
ifndef PEP_MIME_SRC
$(error "Compiling with the PEP_MIME option set requires the value of PEP_MIME_SRC to be set to the source directory for libpEpMIME")
else
CPPFLAGS=-DPEP_BUILTIN_MIME
CXXFLAGS=-DPEP_BUILTIN_MIME
CPPFLAGS+=-DPEP_BUILTIN_MIME
CXXFLAGS+=-DPEP_BUILTIN_MIME
LDLIBS+=-lstdc++
ETPAN_LIB=
ETPAN_INC=


+ 7
- 3
pEpMIME/Makefile View File

@ -28,9 +28,13 @@ ifneq ($(BUILD_ON),$(BUILD_FOR))
$(error I don't know how to build for $(BUILD_FOR) on $(BUILD_ON).)
endif
SED=
# MacOS needs -liconv, Linix don't.
ifeq ($(BUILD_FOR),Darwin)
LDLIBS+= -liconv
SED=sed -i ''
else
SED=sed -i
endif
PEPMIME_SRC_FILES:= $(wildcard $(PEP_MIME_SRC)/*.cc) $(wildcard $(PEP_MIME_SRC)/*.hh) $(wildcard $(PEP_MIME_SRC)/*.hxx)
@ -46,15 +50,15 @@ mimesrc: ${LOCAL_PEPMIME_SRC}
%.hh : $(PEP_MIME_SRC)/%.hh
cp -p $< $@
sed -i '' 's/#include <pEp\/\(.*\)>/#include "..\/src\/\1"/g' $@
$(SED) 's/#include <pEp\/\(.*\)>/#include "..\/src\/\1"/g' $@
%.cc : $(PEP_MIME_SRC)/%.cc
cp -p $< $@
sed -i '' 's/#include <pEp\/\(.*\)>/#include "..\/src\/\1"/g' $@
$(SED) 's/#include <pEp\/\(.*\)>/#include "..\/src\/\1"/g' $@
%.hxx : $(PEP_MIME_SRC)/%.hxx
cp -p $< $@
sed -i '' 's/#include <pEp\/\(.*\)>/#include "..\/src\/\1"/g' $@
$(SED) 's/#include <pEp\/\(.*\)>/#include "..\/src\/\1"/g' $@
LIB_OBJ=pEpMIME.o pEpMIME_internal.o rules.o bodyparser.o \
attachment.o bodygenerator.o \


Loading…
Cancel
Save