p≡p MIME library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

57 lines
1.6 KiB

.PHONY: clear install
CXX=c++
CXXFLAGS += -Wall -O0 -std=c++14 -g -glldb -fstack-protector-all
PREFIX=/usr/local
# !FIXME!
GTEST_DIR=/opt/local/src/googletest
all: libpEpMIME.a unittests fuzz
-include local.conf
libpEpMIME.a: pEpMIME.o pEpMIME_internal.o rules.o bodyparser.o \
headerparser.o parse_timestamp.o parse_address.o nulllogger.o \
base64.o nfc.o mime_headers.o nfc_sets.o to_utf8.o quoted_printable.o \
message.o pEpEngine_mime.o
${AR} rcs $@ $^
unittests: unittest_mime.o unittest_nfc.o unittest_timestamp.o \
unittest_stringcase.o unittest_toutf8.o unittest_address.o \
unittest_rule.o unittest_subject.o \
gtest-all.o gtest_main.o libpEpMIME.a
${CXX} ${CXXFLAGS} -L${PREFIX}/lib -o $@ $^ -lpEpAdapter -lpEpEngine -lpthread -liconv
gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc
${CXX} ${CXXFLAGS} $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -isystem $(GTEST_DIR)/include -o $@ -c $<
gtest_main.o: $(GTEST_DIR)/src/gtest_main.cc
${CXX} ${CXXFLAGS} $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -isystem $(GTEST_DIR)/include -o $@ -c $<
unittest_%.o : unittest_%.cc
${CXX} ${CXXFLAGS} -I${PREFIX}/include -isystem $(GTEST_DIR)/include -o $@ -c $<
fuzz: fuzz.o libpEpMIME.a
${CXX} ${CXXFLAGS} -L${PREFIX}/lib -o $@ $^ -lpEpAdapter -lpEpEngine -lpthread -liconv
fuzz.o: fuzz.cc
${CXX} ${CXXFLAGS} -I${PREFIX}/include -o $@ -c $^
%.o : %.cc %.hh
${CXX} ${CXXFLAGS} -I${PREFIX}/include -o $@ -c $<
%.o : %.cc
${CXX} ${CXXFLAGS} -I${PREFIX}/include -o $@ -c $<
clean:
rm -vf *.o \
*.a \
unittests fuzz
install:
mkdir -p $(PREFIX)/include/pEp
cp pEpMIME.hh $(PREFIX)/include/pEp
mkdir -p $(PREFIX)/lib
cp libpEpMIME.a $(PREFIX)/lib