From bb8e9b31612674b8784b4e144372ea03c13a5907 Mon Sep 17 00:00:00 2001 From: heck Date: Mon, 6 Jan 2020 18:42:25 +0100 Subject: [PATCH] cleanup build, and add test/ dir --- Makefile | 17 +++++++---------- Makefile.conf | 4 ++-- test/Makefile | 15 +++++++++++++++ test_adapter.cc => test/test_adapter.cc | 0 test_library.cc => test/test_library.cc | 0 5 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 test/Makefile rename test_adapter.cc => test/test_adapter.cc (100%) rename test_library.cc => test/test_library.cc (100%) diff --git a/Makefile b/Makefile index 33a58ac..bc978bf 100644 --- a/Makefile +++ b/Makefile @@ -22,23 +22,20 @@ endif SOURCE=$(wildcard *.cc) HEADERS=$(wildcard *.hh *.hxx) OBJECTS=$(subst .cc,.o,$(SOURCE)) -WITHOUT_TESTS=$(patsubst test%.o,,$(OBJECTS)) TARGET=libpEpAdapter.a all: $(TARGET) -$(TARGET): $(WITHOUT_TESTS) +$(TARGET): $(OBJECTS) $(AR) -rc $@ $^ clean: - rm -vf $(TARGET) $(OBJECTS) *.a test_adapter test_library lib - rm -rvf test_adapter.dSYM - rm -rvf test_library.dSYM - rm -rvf .gnupg/ - rm -vf .pEp_management.db* - -distclean: clean - rm -Rvf .gnupg .pEp_management* + rm -vf $(TARGET) $(OBJECTS) +# rm -rvf .gnupg/ +# rm -vf .pEp_management.db* + +# distclean: clean +# rm -Rvf .gnupg .pEp_management* install: $(TARGET) mkdir -p $(PREFIX)/include/pEp diff --git a/Makefile.conf b/Makefile.conf index 89d0578..73426ac 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -11,8 +11,8 @@ BUILD_FOR:=$(shell uname) PREFIX=$(HOME) ######### C and C++ ######### -LDFLAGS=-L. $(ENGINE_LIB) -LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter +#LDFLAGS=-L. $(ENGINE_LIB) +#LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter CXXFLAGS=-std=c++11 ######### C++ ######### diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..8140b4b --- /dev/null +++ b/test/Makefile @@ -0,0 +1,15 @@ +include ../Makefile.conf + +LDFLAGS=-L../ $(ENGINE_LIB) +LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter +CXXFLAGS+=-I../ + +all: test_adapter test_library + +test_adapter: ../libpEpAdapter.a + +clean: + rm -vf test_adapter + rm -rvf test_adapter.dSYM + rm -vf test_library + rm -rvf test_library.dSYM diff --git a/test_adapter.cc b/test/test_adapter.cc similarity index 100% rename from test_adapter.cc rename to test/test_adapter.cc diff --git a/test_library.cc b/test/test_library.cc similarity index 100% rename from test_library.cc rename to test/test_library.cc