Browse Source

cleanup build, and add test/ dir

sync
heck 6 years ago
parent
commit
bb8e9b3161
  1. 17
      Makefile
  2. 4
      Makefile.conf
  3. 15
      test/Makefile
  4. 0
      test/test_adapter.cc
  5. 0
      test/test_library.cc

17
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

4
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++ #########

15
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

0
test_adapter.cc → test/test_adapter.cc

0
test_library.cc → test/test_library.cc

Loading…
Cancel
Save