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
Line 
1SHELL = /bin/sh
2LIB_PATH=../../lib
3COMMON_PATH=../common
4CMDLINE_FILE='"../dgp/cmdline.h"'
5
6
7#vpath %.o  .
8
9CXXFLAGS = -O2 -static -fpermissive
10
11sources = main.cc grammar.cc symbol.cc mgraph.cc sgraph.cc dgp0.cc cmdline.cc \
12          $(COMMON_PATH)/common.cc global.cc
13
14bin  = dgp dgc canonize tre
15
16# plik *.o sa umieszczane w podkatalogu o
17objs = $(sources:%.cc=%.o)
18
19${bin}: ${objs}
20        ${CXX} ${CXXFLAGS} -D _CMDLINE_FILE=$(CMDLINE_FILE) -o $@ ${objs}
21
22include $(sources:.cc=.d)
23
24%.o: %.cc
25        ${CXX} -D _CMDLINE_FILE=$(CMDLINE_FILE) -c ${CXXFLAGS} -o $@ $<
26
27%.d: %.cc
28        $(CC) -MM $(CPPFLAGS) -D _CMDLINE_FILE=$(CMDLINE_FILE) $< > $@.$$$$; \
29        sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
30        rm -f $@.$$$$
31
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
43
44clean:
45        rm ${bin} ${objs} cmdline.cc cmdline.h *.d
46
47prof: dgp
48        gprof dgp ~/tmp/dgp-pl/gmon.out > dgp.prof
49
50copy:
51ifdef UTT_BIN_DIR
52        cp dgp dgc canonize tre $(UTT_BIN_DIR)/
53endif
Note: See TracBrowser for help on using the repository browser.