#vpath %.h ../ #vpath %.cxx ../ #vpath %.h $(ROOTSYS)/include INCLFLAGS = -I$(ROOTSYS)/include -I../ LDLIBS = $(shell root-config --glibs) \ -L/home/carsten/src/panda/cbmsoft/tools/root/lib -lMathCore #LDLIBS = $(shell root-config --glibs) # -lMinuit SOURCES = $(wildcard ../*.cxx) HEADERS = $(wildcard ../*.h) OBJECTS = $(patsubst ../%.cxx,../%.o,$(wildcard ../*.cxx)) CFLAGS = -O2 -DNDEBUG -Wall all: test_simple_bar test_disk test_sheet test_cylinder \ test_focus test_absorption test_test test_titti test_simple_bar: $(OBJECTS) test_simple_bar.o g++ -o test_simple_bar test_simple_bar.o $(OBJECTS) $(LDLIBS) test_simple_bar.o: test_simple_bar.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_simple_bar.o \ -c test_simple_bar.cc test_disk: $(OBJECTS) test_disk.o g++ -o test_disk test_disk.o $(OBJECTS) $(LDLIBS) test_disk.o: test_disk.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_disk.o \ -c test_disk.cc test_sheet: $(OBJECTS) test_sheet.o g++ -o test_sheet test_sheet.o $(OBJECTS) $(LDLIBS) test_sheet.o: test_sheet.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_sheet.o \ -c test_sheet.cc test_cylinder: $(OBJECTS) test_cylinder.o g++ -o test_cylinder test_cylinder.o $(OBJECTS) $(LDLIBS) test_cylinder.o: test_cylinder.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_cylinder.o \ -c test_cylinder.cc test_focus: $(OBJECTS) test_focus.o g++ -o test_focus test_focus.o $(OBJECTS) $(LDLIBS) test_focus.o: test_focus.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_focus.o \ -c test_focus.cc test_absorption: $(OBJECTS) test_absorption.o g++ -o test_absorption test_absorption.o $(OBJECTS) $(LDLIBS) test_absorption.o: test_absorption.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_absorption.o \ -c test_absorption.cc test_test: $(OBJECTS) test_test.o g++ -o test_test test_test.o $(OBJECTS) $(LDLIBS) test_test.o: test_test.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_test.o \ -c test_test.cc test_titti: $(OBJECTS) test_titti.o g++ -o test_titti test_titti.o $(OBJECTS) $(LDLIBS) test_titti.o: test_titti.cc g++ $(CFLAGS) $(INCLFLAGS) -o test_titti.o \ -c test_titti.cc ../%.o : ../%.cxx g++ $(CFLAGS) $(INCLFLAGS) -c $< -o $@ ../%.d : ../%.cxx @set -e; rm -f $@; \ g++ -MM $(CFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; # $(SHELL) -ec '$(CXX) -MM $< \ # # | sed '\''s/\($*\.o\)[ :]*/\1 $@ : /g'\'' > $@' # %.d: %.cxx # @set -e; rm -f $@; \ # $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \ # sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ # rm -f $@.$$$$ #include $(SOURCES:.cxx=.d) .PHONY : clean clean : rm $(OBJECTS) test*.o ../*.d.* #print: $(SOURCES) # echo $(CFLAGS) # echo $(OBJECTS)