Makefile
changeset 15 1b8722ea1a42
parent 6 0110bdfbd7d2
child 16 19b7ea5e3362
     1.1 --- a/Makefile	Thu Oct 04 14:07:10 2018 +0200
     1.2 +++ b/Makefile	Thu Oct 04 17:30:34 2018 +0200
     1.3 @@ -10,16 +10,24 @@
     1.4  
     1.5  SOURCE=$(wildcard *.cc)
     1.6  OBJECTS=$(subst .cc,.o,$(SOURCE))
     1.7 +WITHOUT_TESTS=$(patsubst test%.o,,$(OBJECTS))
     1.8  
     1.9  all: $(TARGET)
    1.10  
    1.11  %.o: %.cc %.hh
    1.12  	$(CXX) $(CXXFLAGS) -c $<
    1.13  
    1.14 -$(TARGET): $(OBJECTS)
    1.15 +$(TARGET): $(WITHOUT_TESTS)
    1.16  	ar -rc $@ $^
    1.17  
    1.18 -.PHONY: clean
    1.19 +.PHONY: clean test
    1.20  
    1.21  clean:
    1.22 -	rm -f $(TARGET) $(OBJECTS)
    1.23 +	rm -f $(TARGET) $(OBJECTS) *.a test_adapter
    1.24 +
    1.25 +test: test_adapter
    1.26 +	./test_adapter
    1.27 +
    1.28 +test_adapter: $(OBJECTS)
    1.29 +	$(CXX) -o $@ -L$(HOME)/lib -lpEpEngine $(OBJECTS)
    1.30 +