1 #############################################################################
3 # Top level makefile for installing Prop and ADLib
5 #############################################################################
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 \
35 TarFile= prop-$(VERSION).tar.gz
37 #############################################################################
39 # Build the ADLib library and the tools
41 #############################################################################
43 cd lib-src; make CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
44 cd prop-src; make CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
51 #############################################################################
55 #############################################################################
57 cd prop-src; make test CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
58 @echo Testing of the prop translation ran ok.
61 cd tests; make test CC="$(CC)" COPTS="$(COPTS)" LDOPTS="$(LDOPTS)"
62 @echo All test programs ran ok.
64 #############################################################################
68 #############################################################################
70 wc include/AD/*/*.h lib-src/*/*.cc \
74 #############################################################################
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 #############################################################################
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
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 #############################################################################
104 bin/Distribute NO_DISTRIBUTE
106 bin/Distribute NO_DISTRIBUTE2
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))