simple.cc - generated code example
[prop.git] / Makefile
blob8f9fedd8023d026833bdf6eb1d1ad86a28f6fd50
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++-3.3
12 COPTS = -O6 -pedantic -frepo -g
13 PROP_COPTS = $(COPTS)
14 #LIBRARY_COPTS = -O6 -pedantic -Wall -fexternal-templates
15 LIBRARY_COPTS = -O6 -pedantic -Wall -g
16 LDOPTS = #-lg++
17 OBJ = obj
19 TARGET_BIN_DIR = /usr/local/bin
20 TARGET_LIB_DIR = /usr/local/lib
21 TARGET_INCLUDE_DIR = /usr/local/include
23 #############################################################################
25 # Build the ADLib library and the tools
27 #############################################################################
28 build:
29 make -C lib-src
30 make -C prop-src
31 make -C docs
32 @echo Done
34 config:
35 ./Configure $(CC)
37 #############################################################################
39 # Test prop
41 #############################################################################
42 test:
43 make test -C prop-src
44 @echo Testing of the prop translator ran ok.
46 testall:
47 make test -C tests
48 @echo All test programs ran ok.
50 demo:
51 make -C demos
52 @echo All demo programs have been compiled.
54 #############################################################################
56 # Line count
58 #############################################################################
59 wc:
60 wc include/AD/*/*.h lib-src/*/*.cc \
61 prop-src/[a-z]*.ph \
62 prop-src/[a-z]*.pcc
64 #############################################################################
66 # Clean up: remove all *.o files and .cc and .h files generated using
67 # Prop. But don't remove the executable and the library.
69 #############################################################################
70 spotless:
71 make spotless -C lib-src
72 make spotless -C prop-src
73 cd tools/test; make spotless
74 cd tests; make spotless
75 cd demos; make spotless
76 cd tools/pretty; make spotless
77 #cd docs; make spotless
79 clean:
80 make clean -C lib-src
81 make clean -C prop-src
83 cleanall:
84 make cleanall -C lib-src
85 make cleanall -C prop-src
87 cleanhouse:
88 cd lib-src; make spotless
89 cd prop-src; make clean
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
95 $(RM) lib-src/$(LIBRARY) prop-src/prop
97 #############################################################################
98 # Make tar.gz files for Unix distribution.
99 #############################################################################
100 dist: tar
101 tar:
102 bin/Distribute NO_DISTRIBUTE
103 full-dist:
104 bin/Distribute NO_DISTRIBUTE2
106 first-install:
107 cp prop-src/prop $(TARGET_BIN_DIR)
108 chmod 755 $(TARGET_BIN_DIR)/prop
109 cp tools/scripts/* $(TARGET_BIN_DIR)
110 cp lib-src/$(LIBRARY) $(TARGET_LIB_DIR)
111 chmod 644 $(TARGET_LIB_DIR)/$(LIBRARY)
112 cp include/propdefs.h $(TARGET_INCLUDE_DIR)
114 install: first-install
115 ln -f -s `pwd`/include/AD $(TARGET_INCLUDE_DIR)/AD
117 full-install: first-install
118 (umask 022; cp -R include $(TARGET_INCLUDE_DIR))