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
19 TARGET_BIN_DIR
= /usr
/local
/bin
20 TARGET_LIB_DIR
= /usr
/local
/lib
21 TARGET_INCLUDE_DIR
= /usr
/local
/include
24 # You may have to add this for g++ 2.6.x
26 #COPTS = -g -O6 -fno-implicit-templates
28 ##############################################################################
29 # Files in the ADLib package:
30 ##############################################################################
31 MiscFiles
= INSTALL README NOTICE COPYRIGHT \
32 Makefile lib-src
/Makefile
33 Areas
= algebra automata contain csp dynparser gc generic \
34 generic hash memory numeric object objc \
35 prop rete rewrite persist prettypr \
36 sort strings symbolic trees tries \
37 scheduling absinterp machine dataflow parser-tools \
39 TarFile
= prop-
$(VERSION
).
tar.gz
41 #############################################################################
43 # Build the ADLib library and the tools
45 #############################################################################
47 cd lib-src
; make CC
="$(CC)" COPTS
="$(LIBRARY_COPTS)" LDOPTS
="$(LDOPTS)" OBJ
="$(OBJ)"
48 cd prop-src
; make CC
="$(CC)" COPTS
="$(PROP_COPTS)" LDOPTS
="$(LDOPTS)" OBJ
="$(OBJ)"
55 #############################################################################
59 #############################################################################
61 cd prop-src
; make
test CC
="$(CC)" COPTS
="$(COPTS)" LDOPTS
="$(LDOPTS)" OBJ
="$(OBJ)"
62 @echo Testing of the prop translator ran ok.
65 cd tests
; make
test CC
="$(CC)" COPTS
="$(COPTS)" LDOPTS
="$(LDOPTS)" OBJ
="$(OBJ)"
66 @echo All
test programs ran ok.
69 cd demos
; make CC
="$(CC)" COPTS
="$(COPTS)" LDOPTS
="$(LDOPTS)" OBJ
="$(OBJ)"
70 @echo All demo programs have been compiled.
72 #############################################################################
76 #############################################################################
78 wc
include/AD
/*/*.h lib-src
/*/*.
cc \
82 #############################################################################
84 # Clean up: remove all *.o files and .cc and .h files generated using
85 # Prop. But don't remove the executable and the library.
87 #############################################################################
89 cd lib-src
; make spotless
90 cd prop-src
; make spotless
91 cd tools
/test; make spotless
92 cd tests
; make spotless
93 cd demos
; make spotless
94 cd tools
/pretty
; make spotless
95 #cd docs; make spotless
98 cd lib-src
; make spotless
99 cd prop-src
; make
clean
100 cd tools
/test; make spotless
101 cd tests
; make spotless
102 cd demos
; make spotless
103 cd tools
/pretty
; make spotless
104 cd docs
; make spotless
105 $(RM
) lib-src
/$(LIBRARY
) prop-src
/prop
107 #############################################################################
108 # Make tar.gz files for Unix distribution.
109 #############################################################################
112 bin
/Distribute NO_DISTRIBUTE
114 bin
/Distribute NO_DISTRIBUTE2
117 cp prop-src
/prop
$(TARGET_BIN_DIR
)
118 chmod
755 $(TARGET_BIN_DIR
)/prop
119 cp tools
/scripts
/* $(TARGET_BIN_DIR
)
120 cp lib-src
/$(LIBRARY
) $(TARGET_LIB_DIR
)
121 chmod
644 $(TARGET_LIB_DIR
)/$(LIBRARY
)
122 cp
include/propdefs.h
$(TARGET_INCLUDE_DIR
)
124 install: first-install
125 ln
-f
-s
`pwd`/include/AD
$(TARGET_INCLUDE_DIR
)/AD
127 full-install
: first-install
128 (umask
022; cp
-R
include $(TARGET_INCLUDE_DIR
))