source: app/src/dgp/Makefile @ 28e9ae0

help
Last change on this file since 28e9ae0 was 28e9ae0, checked in by obrebski <obrebski@…>, 17 years ago

dgp korzysta z normalnego common.cc i bierze wspolne parametry z cmdline_common.ggo

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@35 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

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