SHELL = /bin/sh LIB_PATH=../../lib #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 tre.rb $(UTT_BIN_DIR)/ # ponizsza linijka jest do usuniecia cp go attr.pm seg.rb $(UTT_BIN_DIR)/ endif