1 #############################################################################
3 # Top level makefile for installing Prop and ADLib
5 #############################################################################
12 COPTS
= -O6
-pedantic
-frepo
-g
14 #LIBRARY_COPTS = -O6 -pedantic -Wall -fexternal-templates
15 LIBRARY_COPTS
= -O6
-pedantic
-Wall
-g
18 TARGET_BIN_DIR
= /usr
/local
/bin
19 TARGET_LIB_DIR
= /usr
/local
/lib
20 TARGET_INCLUDE_DIR
= /usr
/local
/include
23 # You may have to add this for g++ 2.6.x
25 #COPTS = -g -O6 -fno-implicit-templates
27 ##############################################################################
28 # Files in the ADLib package:
29 ##############################################################################
30 MiscFiles
= INSTALL README NOTICE COPYRIGHT \
31 Makefile lib-src
/Makefile
32 Areas
= algebra automata contain csp dynparser gc generic \
33 generic hash memory numeric object objc \
34 prop rete rewrite persist prettypr \
35 sort strings symbolic trees tries \
36 scheduling absinterp machine dataflow parser-tools \
38 TarFile
= prop-
$(VERSION
).
tar.gz
40 #############################################################################
42 # Build the ADLib library and the tools
44 #############################################################################
46 cd lib-src
; make CC
="$(CC)" COPTS
="$(LIBRARY_COPTS)" LDOPTS
="$(LDOPTS)"
47 cd prop-src
; make CC
="$(CC)" COPTS
="$(PROP_COPTS)" LDOPTS
="$(LDOPTS)"
54 #############################################################################
58 #############################################################################
60 cd prop-src
; make
test CC
="$(CC)" COPTS
="$(COPTS)" LDOPTS
="$(LDOPTS)"
61 @echo Testing of the prop translator ran ok.
64 cd tests
; make
test CC
="$(CC)" COPTS
="$(COPTS)" LDOPTS
="$(LDOPTS)"
65 @echo All
test programs ran ok.
68 cd demos
; make CC
="$(CC)" COPTS
="$(COPTS)" LDOPTS
="$(LDOPTS)"
69 @echo All demo programs have been compiled.
71 #############################################################################
75 #############################################################################
77 wc
include/AD
/*/*.h lib-src
/*/*.
cc \
81 #############################################################################
83 # Clean up: remove all *.o files and .cc and .h files generated using
84 # Prop. But don't remove the executable and the library.
86 #############################################################################
88 cd lib-src
; make spotless
89 cd prop-src
; make spotless
90 cd tools
/test; make spotless
91 cd tests
; make spotless
92 cd demos
; make spotless
93 cd tools
/pretty
; make spotless
94 #cd docs; make spotless
97 cd lib-src
; make spotless
98 cd prop-src
; make
clean
99 cd tools
/test; make spotless
100 cd tests
; make spotless
101 cd demos
; make spotless
102 cd tools
/pretty
; make spotless
103 cd docs
; make spotless
104 $(RM
) lib-src
/$(LIBRARY
) prop-src
/prop
106 #############################################################################
107 # Make tar.gz files for Unix distribution.
108 #############################################################################
111 bin
/Distribute NO_DISTRIBUTE
113 bin
/Distribute NO_DISTRIBUTE2
116 cp prop-src
/prop
$(TARGET_BIN_DIR
)
117 chmod
755 $(TARGET_BIN_DIR
)/prop
118 cp tools
/scripts
/* $(TARGET_BIN_DIR
)
119 cp lib-src
/$(LIBRARY
) $(TARGET_LIB_DIR
)
120 chmod
644 $(TARGET_LIB_DIR
)/$(LIBRARY
)
121 cp
include/propdefs.h
$(TARGET_INCLUDE_DIR
)
123 install: first-install
124 ln
-f
-s
`pwd`/include/AD
$(TARGET_INCLUDE_DIR
)/AD
126 full-install
: first-install
127 (umask
022; cp
-R
include $(TARGET_INCLUDE_DIR
))