aboutsummaryrefslogblamecommitdiffstats
path: root/test/Makefile
blob: d13857329d84948da5fd5effa4902f2025a62820 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                                                                                                        




                   

                                                                                                                               
                           
                        
 




                             


                         
                                  




                                                             
             
                                           
 
      
                                           






                                                                        
CXXFLAGS:=-Wall -Werror -lcppunit -I../src -I../src/base -I../src/menu -I../src/media -I../src/screens -g -fprofile-arcs -ftest-coverage
LDFLAGS:=-lsqlite3 -lSDL -llog4cxx -lboost_program_options-mt -lboost_filesystem-mt -lSDL_image -coverage

PROJECT:=usdx-tests
TARGET:=$(PROJECT)

zip:=$(PROJECT).rar
headers:=$(wildcard *.hpp) $(wildcard */*.hpp) $(wildcard ../src/*/*/*.hpp) $(wildcard ../src/*/*.hpp) $(wildcard ../src/*.hpp)
sources:=$(wildcard *.cpp) $(wildcard */*.cpp) $(wildcard ../src/*/*/*.cpp) $(wildcard ../src/*/*.cpp) $(wildcard ../src/*.cpp)
objects:=$(sources:.cpp=.o)
deps:=$(sources:.cpp=.d)

all:	$(deps) $(TARGET)

ifneq ($(MAKECMDGOALS),clean)
-include $(deps)
endif

.PHONY:	all clean run zip

$(TARGET):	$(objects) $(deps)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TARGET) $(objects)

%.o:	%.cpp
	$(CXX) $(CXXFLAGS) -MMD -c $< -o $@

%.d:	%.cpp
	$(CXX) $(CXXFLAGS) -MM -c $< -MF $@

clean:
	-$(RM) $(TARGET) $(objects) $(deps)

run:	$(TARGET)
	./$(TARGET)

zip:
	-$(RM) $(zip)
	rar a -s -m5 -ap$(PROJECT) $(zip) $(headers) $(sources) Makefile