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