build fun pEpMIME
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Thu, 16 Apr 2020 20:35:53 +0200
branchpEpMIME
changeset 4577ffae0defc0a4
parent 4576 7782e71b4c0a
child 4730 a47eadde1552
build fun
Makefile.conf
src/Makefile
     1.1 --- a/Makefile.conf	Thu Apr 16 12:18:17 2020 +0200
     1.2 +++ b/Makefile.conf	Thu Apr 16 20:35:53 2020 +0200
     1.3 @@ -200,6 +200,24 @@
     1.4  #ASN1C_INC=-I$(HOME)/include
     1.5  
     1.6  
     1.7 +#########   MIME   #########
     1.8 +# Must be either ETPAN or PEPMIME.
     1.9 +# N.B. PEPMIME is currently experimental.
    1.10 +#
    1.11 +MIME_LIBRARY=ETPAN
    1.12 +#MIME_LIBRARY=PEPMIME
    1.13 + 
    1.14 + 
    1.15 +######### pEp MIME #########
    1.16 +# pEp MIME library search flag
    1.17 +#
    1.18 +PEP_MIME_LIB=
    1.19 +#PEP_MIME_LIB=-L$(HOME)/pEp/lib
    1.20 +
    1.21 +# pEp MIME include search flag
    1.22 +PEP_MIME_INC=
    1.23 +#PEP_MIME_INC=-I$(HOME)/pEp/include
    1.24 +
    1.25  ######### libetpan #########
    1.26  # libetpan library search flag
    1.27  ETPAN_LIB=
    1.28 @@ -209,17 +227,6 @@
    1.29  ETPAN_INC=
    1.30  #ETPAN_INC=-I$(HOME)/include
    1.31  
    1.32 -
    1.33 -######### pEp MIME #########
    1.34 -# set this to skip libetpan and use PEP_MIME instead
    1.35 -# PEP_MIME=1
    1.36 -#
    1.37 -# pEp MIME library search flag
    1.38 -PEP_MIME_LIB=
    1.39 -# pEp MIME include search flag
    1.40 -PEP_MIME_INC=
    1.41 -
    1.42 -
    1.43  ######### sqlite3 #########
    1.44  # If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution.
    1.45  # Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
     2.1 --- a/src/Makefile	Thu Apr 16 12:18:17 2020 +0200
     2.2 +++ b/src/Makefile	Thu Apr 16 20:35:53 2020 +0200
     2.3 @@ -18,13 +18,6 @@
     2.4  LDLIBS+= -lc -lasn1
     2.5  NO_SOURCE=
     2.6  
     2.7 -ifndef PEP_MIME
     2.8 -LDLIBS+= -letpan
     2.9 -else
    2.10 -LDLIBS+= -lpEpMIME
    2.11 -NO_SOURCE+= etpan_mime.c
    2.12 -endif
    2.13 -
    2.14  ifeq ($(BUILD_ON),Darwin)
    2.15      ifeq ($(BUILD_FOR),Darwin)
    2.16          CFLAGS+= -DSQLITE_THREADSAFE=1
    2.17 @@ -57,6 +50,19 @@
    2.18      $(error Unknown OpenPGP library: $(OPENPGP))
    2.19  endif
    2.20  
    2.21 +ifeq ($(MIME_LIBRARY),ETPAN)
    2.22 +    CFLAGS+= -DUSE_ETPAN $(ETPAN_INC)
    2.23 +    LDFLAGS+= $(ETPAN_LIB)
    2.24 +    LDLIBS+= -letpan
    2.25 +else ifeq ($(MIME_LIBRARY),PEP_MIME)
    2.26 +    CFLAGS+= -DUSE_PEPMIME $(PEP_MIME_INC)
    2.27 +    LDFLAGS+= $(PEP_MIME_LIB)
    2.28 +    LDLIBS+= -lpEpMIME
    2.29 +    NO_SOURCE+= etpan_mime.c
    2.30 +else
    2.31 +    $(error Unknown MIME library: $(MIME_LIBRARY))
    2.32 +endif
    2.33 +
    2.34  ALL_SOURCE=$(filter-out $(NO_SOURCE),$(wildcard *.c))
    2.35  DEPENDS=$(subst .c,.d,$(ALL_SOURCE))
    2.36  ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))