diff --git a/Makefile b/Makefile index bc978bf..b8c723c 100644 --- a/Makefile +++ b/Makefile @@ -17,25 +17,26 @@ ifdef BUILD_CONFIG $(info ================================================) endif -.PHONY: all, clean, distclean, test, install, uninstall +.PHONY: all, lib, test, install, uninstall, clean SOURCE=$(wildcard *.cc) HEADERS=$(wildcard *.hh *.hxx) OBJECTS=$(subst .cc,.o,$(SOURCE)) TARGET=libpEpAdapter.a -all: $(TARGET) +lib: $(TARGET) + +all: lib test + +test: lib + $(MAKE) -C test all $(TARGET): $(OBJECTS) $(AR) -rc $@ $^ clean: rm -vf $(TARGET) $(OBJECTS) -# rm -rvf .gnupg/ -# rm -vf .pEp_management.db* - -# distclean: clean -# rm -Rvf .gnupg .pEp_management* + $(MAKE) -C test clean install: $(TARGET) mkdir -p $(PREFIX)/include/pEp diff --git a/Makefile.conf b/Makefile.conf index 73426ac..72fa993 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -4,15 +4,13 @@ # see LICENSE.txt ######### Header ######### -HERE:=$(dir $(lastword $(MAKEFILE_LIST))) +HERE:= $(notdir $(CURDIR)) ######### General ######### BUILD_FOR:=$(shell uname) PREFIX=$(HOME) ######### C and C++ ######### -#LDFLAGS=-L. $(ENGINE_LIB) -#LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter CXXFLAGS=-std=c++11 ######### C++ ######### diff --git a/test/Makefile b/test/Makefile index 8140b4b..eebdd3b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -4,12 +4,17 @@ LDFLAGS=-L../ $(ENGINE_LIB) LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter CXXFLAGS+=-I../ +.PHONY=all, test_adapter, test_library + all: test_adapter test_library -test_adapter: ../libpEpAdapter.a +test_adapter: test_adapter.cc ../libpEpAdapter.a + +test_library: test_library.cc ../libpEpAdapter.a clean: rm -vf test_adapter rm -rvf test_adapter.dSYM rm -vf test_library rm -rvf test_library.dSYM +