SHELL = /bin/sh #vpath %.o . CXXFLAGS = -O2 -static sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp0.cc cmdline.cc \ common.cc global.cc bin = dgp # plik *.o sa umieszczane w podkatalogu o objs = $(sources:%.cc=%.o) ${bin}: ${objs} ${CXX} ${CXXFLAGS} -o $@ ${objs} include $(sources:.cc=.d) %.o: %.cc ${CXX} -c ${CXXFLAGS} -o $@ $< %.d: %.cc $(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ cmdline.cc cmdline.h : cmdline.ggo gengetopt --c-extension=cc -i cmdline.ggo clean: rm ${bin} ${objs} cmdline.cc cmdline.h rm -rf *.d prof: dgp gprof dgp ~/tmp/dgp-pl/gmon.out > dgp.prof copy: ifdef UTT_BIN_DIR cp dgp dgc canonize $(UTT_BIN_DIR) endif