source: _old/app/src/dgp/Makefile @ 1e121f4

Last change on this file since 1e121f4 was 1e121f4, checked in by Adam Kędziora <s301614@…>, 14 years ago

Replacing old implementation with working implementation

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[0214596]1SHELL = /bin/sh
[ff0fc99]2LIB_PATH=../../lib
[28e9ae0]3COMMON_PATH=../common
4CMDLINE_FILE='"../dgp/cmdline.h"'
5
[0214596]6
[b6109b9]7#vpath %.o  .
[0214596]8
[1e121f4]9CXXFLAGS = -O2 -static -fpermissive
[0214596]10
11sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp0.cc cmdline.cc \
[28e9ae0]12          $(COMMON_PATH)/common.cc global.cc
[0214596]13
[1e121f4]14bin  = dgp dgc canonize tre
[0214596]15
16# plik *.o sa umieszczane w podkatalogu o
[b6109b9]17objs = $(sources:%.cc=%.o)
[0214596]18
19${bin}: ${objs}
[13a8a67]20        ${CXX} ${CXXFLAGS} -D _CMDLINE_FILE=$(CMDLINE_FILE) -o $@ ${objs}
[0214596]21
22include $(sources:.cc=.d)
23
[b6109b9]24%.o: %.cc
[28e9ae0]25        ${CXX} -D _CMDLINE_FILE=$(CMDLINE_FILE) -c ${CXXFLAGS} -o $@ $<
[0214596]26
27%.d: %.cc
[13a8a67]28        $(CC) -MM $(CPPFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) $< > $@.$$$$; \
[b6109b9]29        sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
[0214596]30        rm -f $@.$$$$
31
[28e9ae0]32# stare:
33# cmdline.cc cmdline.h : cmdline.ggo
34#       gengetopt --c-extension=cc -i cmdline.ggo
35# nowe
36cmdline.cc cmdline.h: cmdline.ggo
37        gengetopt -i cmdline.ggo  --c-extension=cc --conf-parser
38
39cmdline.ggo: cmdline_dgp.ggo ../common/cmdline_common.ggo
40        cat cmdline_dgp.ggo ../common/cmdline_common.ggo > cmdline.ggo
41# endnowe
42
[0214596]43
44clean:
[1e121f4]45        rm ${bin} ${objs} cmdline.cc cmdline.h *.d
[0214596]46
47prof: dgp
48        gprof dgp ~/tmp/dgp-pl/gmon.out > dgp.prof
[b6109b9]49
50copy:
51ifdef UTT_BIN_DIR
[b012e2a]52        cp dgp dgc canonize tre $(UTT_BIN_DIR)/
[b6109b9]53endif
Note: See TracBrowser for help on using the repository browser.