Makefile
author Volker Birk <vb@pep.foundation>
Thu, 04 Oct 2018 17:30:34 +0200
changeset 15 1b8722ea1a42
parent 6 0110bdfbd7d2
child 16 19b7ea5e3362
permissions -rw-r--r--
...
     1 # this file is under GNU GPL 3.0, see LICENSE.txt
     2 
     3 include Makefile.conf
     4 -include local.conf
     5 
     6 TARGET?=libpEpAdapter.a
     7 PEPENGINE_IN?=$(HOME)
     8 
     9 CXXFLAGS += -I$(HOME)/include -std=c++14
    10 
    11 SOURCE=$(wildcard *.cc)
    12 OBJECTS=$(subst .cc,.o,$(SOURCE))
    13 WITHOUT_TESTS=$(patsubst test%.o,,$(OBJECTS))
    14 
    15 all: $(TARGET)
    16 
    17 %.o: %.cc %.hh
    18 	$(CXX) $(CXXFLAGS) -c $<
    19 
    20 $(TARGET): $(WITHOUT_TESTS)
    21 	ar -rc $@ $^
    22 
    23 .PHONY: clean test
    24 
    25 clean:
    26 	rm -f $(TARGET) $(OBJECTS) *.a test_adapter
    27 
    28 test: test_adapter
    29 	./test_adapter
    30 
    31 test_adapter: $(OBJECTS)
    32 	$(CXX) -o $@ -L$(HOME)/lib -lpEpEngine $(OBJECTS)
    33