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.
 
 
 

46 lines
1.5 KiB

.PHONY: all clear
CXX=c++
CXXFLAGS += -Wall -O0 -std=c++14 -g -glldb -fstack-protector-all
# !FIXME!
GTEST_DIR=$(HOME)/code/googletest/
-include local.conf
all: libpEpMIME.a unittests fuzz
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${HOME}/local/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${HOME}/local/include/ -I/usr/local/include -isystem $(GTEST_DIR)/include -o $@ -c $<
fuzz: fuzz.o libpEpMIME.a
${CXX} ${CXXFLAGS} -L${HOME}/local/lib/ -o $@ $^ -lpEpAdapter -lpEpEngine -lpthread -liconv
fuzz.o: fuzz.cc
${CXX} ${CXXFLAGS} -I${HOME}/local/include/ -o $@ -c $^
%.o : %.cc %.hh
${CXX} ${CXXFLAGS} -I${HOME}/local/include/ -I/usr/local/include -o $@ -c $<
clean:
rm -vf *.o \
*.a \
unittests fuzz