Browse Source

Tried minimizing makefile complexity, clean out unused stuff.

now:
'make' defaults to 'make lib'
'make lib' - build static lib only
'make test' - build tests with lib as prereq.
'make all' - same as 'make test'

test changes to lib using e.g:
'make test && test/test_adapter'
sync
heck 6 years ago
parent
commit
e9d5c27bc0
  1. 15
      Makefile
  2. 4
      Makefile.conf
  3. 7
      test/Makefile

15
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

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

7
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

Loading…
Cancel
Save