Browse Source

Makefile support for CXXFLAGS

MIME-4
Volker Birk 3 years ago
parent
commit
9a66d49940
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      src/Makefile

+ 10
- 10
src/Makefile View File

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


Loading…
Cancel
Save