Browse Source

ENGINE-864: Makefile tweaks. Will have to come into default, but since we're doing this anyway...

ENGINE-864 ENGINE-864
Krista Bennett 9 months ago
parent
commit
f88f7d0351
3 changed files with 8 additions and 15 deletions
  1. +1
    -1
      asn.1/Makefile
  2. +2
    -2
      src/Makefile
  3. +5
    -12
      test/Makefile

+ 1
- 1
asn.1/Makefile View File

@ -17,7 +17,7 @@ libasn1.a: $(ALL_OBJECTS)
$(AR) -rc $@ $(ALL_OBJECTS)
%.o: %.c %.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(OPTIMIZE) $(ASN1C_INC) -c $< -o $@
$(CC) $(CFLAGS) $(CPPFLAGS) $(OPTIMIZE) $(ASN1C_INC) -c $< -o $@
Sync.c: sync.asn1 keysync.asn1 pEp.asn1
$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keysync.asn1 $<


+ 2
- 2
src/Makefile View File

@ -73,7 +73,7 @@ all: $(TARGET)
%.d: %.c
@set -e; rm -f $@; \
$(CC) -MM $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \
$(CC) -MM $(CFLAGS) $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
@ -83,7 +83,7 @@ ifneq ($(MAKECMDGOALS),clean)
endif
$(TARGET): libpEpEngine.a
$(CC) $(CPPFLAGS) $(CFLAGS) $(ALL_OBJECTS) $(LDFLAGS) $(LDLIBS) -o $@
$(CC) $(CFLAGS) $(CPPFLAGS) $(ALL_OBJECTS) $(LDFLAGS) $(LDLIBS) -o $@
.PHONY: objects clean install_headers install uninstall beinstall


+ 5
- 12
test/Makefile View File

@ -28,16 +28,10 @@ endif
CPPFLAGS+= -DGTEST_SUITE_SYM=$(GTEST_SUITE_SYM)
ifeq ($(OPENPGP),GPG)
LDFLAGS+= $(GPGME_LIB)
else ifeq ($(OPENPGP),NETPGP)
LDFLAGS+= $(NETGPG_LIB)
endif
ifdef PEP_MIME
LDLIBS+= -lpEpMIME
LDLIBS+= -lpEpMIME
else
LDLIBS_= -letpan
LDLIBS+= -letpan
endif
LDLIBS+= -lpEpEngine -lstdc++ -lasn1
@ -58,10 +52,9 @@ ifdef SQLITE3_FROM_OS
LDLIBS+= -lsqlite3
endif
CXXFLAGS:=-I$(GTEST_INC_DIR) $(filter-out -DNDEBUG,$(CXXFLAGS))
CXXFLAGS:=$(filter-out -DNDEBUG,$(CXXFLAGS)) -I$(GTEST_INC_DIR)
CPPFLAGS:=$(filter-out -DNDEBUG,$(CPPFLAGS))
# FIXME Possibly missing incdirs: ASN1C_INC
CXXFLAGS+= -I./src -I../src -I ../asn.1 -I../sync $(INC_FLAGS) -Wno-deprecated -Wno-unused-variable
EXTRA_LIB_PATHS=.:../src:
@ -91,10 +84,10 @@ all:
make $(TARGET)
%.d: %.cc
$(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $< | sed -e 's,\($*\)\.o[ :]*,\1.o $@: ,g' > $@
$(CXX) -MM $(CXXFLAGS) $(CPPFLAGS) $< | sed -e 's,\($*\)\.o[ :]*,\1.o $@: ,g' > $@
$(TARGET): $(OBJS)
${CXX} ${CPPFLAGS} ${LDFLAGS} -L${PREFIX}/lib -o $@ $^ -lpEpEngine -lgtest -lgtest_main -lsequoia_openpgp_ffi $(LDLIBS)
${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -L${PREFIX}/lib -o $@ $^ -lpEpEngine -lgtest -lgtest_main -lsequoia_openpgp_ffi $(LDLIBS)
test: all


Loading…
Cancel
Save