initial
[prop.git] / tests / Makefile.gc
blob2da6ffa5934a429286f3409fe265610bfe001264
1 ##############################################################################
2 #  Makefile for compiling the sample programs in this directory
3 #  You *must* have prop and adlib already compiled.
4 ##############################################################################
7 #  The version of prop
9 PROPVER = prop-2.1
12 #  C++ compiler setup  (assume gcc)
14 CC      = g++
15 CINCLUDE= -I../../include
16 COPTS   = -O6 $(CINCLUDE)
17 LIB     = -L../../src -lad -liostream -lg++
18 RM      = /bin/rm 
21 #  The executable.  I assume you have set up the directory hierarchy
22 #  the same way I do. 
24 PROP    = ../$(PROPVER)/prop
28 #  Options to prop
29 #  -l    generate no #line directives
30 #  -f    generate fast tables
31 #  -r    generate a long report listing
33 PROP_OPTS= -l -r 
36 #  The sample source 
38 PROP_SRC= hashcons.pcc hashcons2.pcc \
39           inference.pcc rewriting.pcc logical_patterns.pcc \
40           refcounting.pcc \
41           test_gc2.pcc test_gc3.pcc test_gc4.pcc \
42           test_gc5.pcc \
43           test_gc9.pcc test_gc10.pcc test_gc11.pcc \
44           test_gc12.pcc test_rc1.pcc 
47 #  Generated C++ source from prop
49 SRC     = hashcons.cc hashcons2.cc \
50           inference.cc logical_patterns.cc rewriting.cc \
51           refcounting.cc test_gc2.cc test_gc3.cc test_gc4.cc \
52           test_gc5.cc test_rc1.cc \
53           test_gc9.cc test_gc10.cc test_gc11.cc \
54           test_gc12.cc test_rc1.cc 
57 #  Compiled demo programs
59 PROGS= test_gc1 test_gc2 test_gc3 test_gc4 test_gc5 test_gc6 test_gc7 \
60        test_gc8 test_gc9 test_gc10 test_gc11 test_gc12 test_gc13 test_gc14 \
61        test_gc15 test_gc16 \
62        test_rc1
65 #  Prop's output log
67 PROP_LOG= rewriting.output
71 #  Various rules
74 build:  $(SRC) $(PROGS)
75         @echo Done.
76 clean:  
77         $(RM) -f $(SRC)
78 spotless:       clean
79         $(RM) -f $(PROP_LOG) $(PROGS)
81 test:   $(PROGS)
82         for d in $(PROGS); do $$d || exit 1; done
84 #%.cc:  %.pcc $(PROP)
85 #       $(PROP) $(PROP_OPTS) $(@:.cc=.pcc)
86 #%.h:   %.ph $(PROP)
87 #       $(PROP) $(PROP_OPTS) $(@:.h=.ph)
88 %:      %.cc ../../src/libad.a
89         $(CC) $(COPTS) -o $@ $@.cc $(LIB)