simple.cc - generated code example
[prop.git] / configure-dir / Makefile.top
blobf3891f414a69fb72f8fcfdbd17d33aa6d63bfc70
1 #############################################################################
3 #  Top level makefile for installing Prop and ADLib
5 #############################################################################
7 VERSION = 2.3.0
9 RM      = rm -f 
10 LIBRARY = libprop.a
11 CC      = g++
12 COPTS   = -O6
13 LDOPTS  = -lg++
15 TARGET_BIN_DIR = /usr/local/bin
16 TARGET_LIB_DIR = /usr/local/lib
17 TARGET_INCLUDE_DIR = /usr/local/include
20 #  You may have to add this for g++ 2.6.x
22 #COPTS   = -g -O6 -fno-implicit-templates
24 ##############################################################################
25 #   Files in the ADLib package:
26 ##############################################################################
27 MiscFiles= INSTALL README NOTICE COPYRIGHT \
28            Makefile lib-src/Makefile 
29 Areas   = algebra automata contain csp dynparser gc generic \
30           generic hash memory numeric object objc \
31           prop rete rewrite persist prettypr \
32           sort strings symbolic trees tries \
33           scheduling absinterp machine dataflow parser-tools \
34           backend_tools 
35 TarFile= prop-$(VERSION).tar.gz
37 #############################################################################
39 #   Build the ADLib library and the tools
41 #############################################################################
42 build:
43         cd lib-src; make CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
44         cd prop-src; make CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
45         cd docs; make
46         @echo Done
48 config:
49         ./Configure $(CC)
51 #############################################################################
53 #   Test prop
55 #############################################################################
56 test:
57         cd prop-src; make test CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
58         @echo Testing of the prop translation ran ok.
60 testall:        
61         cd tests; make test CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
62         @echo All test programs ran ok.
64 #############################################################################
65 #  
66 #  Line count
67
68 #############################################################################
69 wc:     
70         wc include/AD/*/*.h lib-src/*/*.cc \
71         prop-src/[a-z]*.ph \
72         prop-src/[a-z]*.pcc
74 #############################################################################
75 #  
76 #  Clean up: remove all *.o files and .cc and .h files generated using
77 #            Prop.  But don't remove the executable and the library.
79 #############################################################################
80 spotless:
81         cd lib-src; make spotless
82         cd prop-src; make spotless
83         cd tools/test; make spotless
84         cd tests; make spotless
85         cd demos; make spotless
86         cd tools/pretty; make spotless
87         #cd docs; make spotless
89 cleanhouse:     
90         cd lib-src; make spotless
91         cd prop-src; make clean
92         cd tools/test; make spotless
93         cd tests; make spotless
94         cd demos; make spotless
95         cd tools/pretty; make spotless
96         cd docs; make spotless
97         $(RM) lib-src/$(LIBRARY) prop-src/prop
99 #############################################################################
100 #  Make tar.gz files for Unix distribution.
101 #############################################################################
102 dist:   tar
103 tar:    
104         bin/Distribute NO_DISTRIBUTE
105 full-dist:
106         bin/Distribute NO_DISTRIBUTE2
108 first-install: 
109         cp prop-src/prop $(TARGET_BIN_DIR)
110         chmod 755 $(TARGET_BIN_DIR)/prop
111         cp tools/scripts/* $(TARGET_BIN_DIR)
112         cp lib-src/$(LIBRARY) $(TARGET_LIB_DIR)
113         chmod 644 $(TARGET_LIB_DIR)/$(LIBRARY)
114         cp include/propdefs.h $(TARGET_INCLUDE_DIR)
116 install: first-install
117         ln -f -s `pwd`/include/AD $(TARGET_INCLUDE_DIR)/AD
119 full-install: first-install
120         (umask 022; cp -R include $(TARGET_INCLUDE_DIR))