1 | #*************************************************************************# |
---|
2 | #* *# |
---|
3 | #* Makefile for the C4.5 induction system *# |
---|
4 | #* -------------------------------------- *# |
---|
5 | #* *# |
---|
6 | #*************************************************************************# |
---|
7 | |
---|
8 | |
---|
9 | # Set CFLAGS for your C compiler, e.g. |
---|
10 | # |
---|
11 | # * if you need to debug the programs (sorry about that!) |
---|
12 | # CFLAGS = -g |
---|
13 | # (You might also want to reactivate the lint commands that |
---|
14 | # have been commented out below.) |
---|
15 | # |
---|
16 | # * if your C compiler supports higher optimization levels |
---|
17 | # CFLAGS = -O3 etc |
---|
18 | |
---|
19 | |
---|
20 | CFLAGS = -xO3 -g |
---|
21 | |
---|
22 | |
---|
23 | # Definitions of file sets |
---|
24 | |
---|
25 | core.ln = \ |
---|
26 | getnames.ln getdata.ln trees.ln getopt.ln header.ln |
---|
27 | |
---|
28 | trees.ln = \ |
---|
29 | besttree.ln build.ln info.ln discr.ln contin.ln subset.ln\ |
---|
30 | prune.ln stats.ln st-thresh.ln classify.ln confmat.ln\ |
---|
31 | sort.ln $(core.ln) |
---|
32 | |
---|
33 | rules.ln = \ |
---|
34 | rules.ln genlogs.ln genrules.ln makerules.ln prunerule.ln\ |
---|
35 | siftrules.ln testrules.ln stats.ln confmat.ln sort.ln $(core.ln) |
---|
36 | |
---|
37 | core = \ |
---|
38 | getnames.o getdata.o trees.o getopt.o header.o |
---|
39 | |
---|
40 | trees = \ |
---|
41 | besttree.o build.o info.o discr.o contin.o subset.o prune.o\ |
---|
42 | stats.o st-thresh.o classify.o confmat.o sort.o $(core) |
---|
43 | |
---|
44 | rules = \ |
---|
45 | rules.o genlogs.o genrules.o makerules.o prunerule.o\ |
---|
46 | siftrules.o testrules.o stats.o confmat.o sort.o $(core) |
---|
47 | |
---|
48 | |
---|
49 | # C4.5 decision tree generator |
---|
50 | |
---|
51 | c4.5: c4.5.o $(trees) |
---|
52 | # lint -x c4.5.ln $(trees.ln) -lm |
---|
53 | cc -o c4.5 c4.5.o $(trees) -lm |
---|
54 | |
---|
55 | # (Sample only: for compiler that supports global optimization, |
---|
56 | # e.g. DECstation 3100) |
---|
57 | |
---|
58 | c4.5gt: |
---|
59 | cat defns.i types.i\ |
---|
60 | c4.5.c\ |
---|
61 | besttree.c build.c info.c discr.c contin.c subset.c\ |
---|
62 | prune.c stats.c st-thresh.c confmat.c sort.c\ |
---|
63 | getnames.c getdata.c classify.c trees.c header.c\ |
---|
64 | | egrep -v 'defns.i|types.i|extern.i|buildex.i' >c4.5gt.c |
---|
65 | cc -O4 -o c4.5gt c4.5gt.c -lm |
---|
66 | rm c4.5gt.c |
---|
67 | |
---|
68 | |
---|
69 | # C4.5 production rule generator |
---|
70 | |
---|
71 | c4.5rules: c4.5rules.o $(rules) |
---|
72 | # lint -x c4.5rules.ln $(rules.ln) -lm |
---|
73 | cc -o c4.5rules c4.5rules.o $(rules) -lm |
---|
74 | |
---|
75 | |
---|
76 | c4.5rulesgt: |
---|
77 | cat defns.i types.i\ |
---|
78 | c4.5rules.c\ |
---|
79 | rules.c genlogs.c genrules.c makerules.c prunerule.c\ |
---|
80 | siftrules.c testrules.c stats.c confmat.c sort.c\ |
---|
81 | getnames.c getdata.c classify.c trees.c header.c\ |
---|
82 | | egrep -v 'defns.i|types.i|extern.i|rulex.i' >c4.5rulesgt.c |
---|
83 | cc -O4 -o c4.5rulesgt c4.5rulesgt.c -lm |
---|
84 | rm c4.5rulesgt.c |
---|
85 | |
---|
86 | |
---|
87 | |
---|
88 | # C4.5 decision tree interpreter |
---|
89 | |
---|
90 | consult: consult.o userint.o $(core) |
---|
91 | # lint -x consult.ln userint.ln $(core.ln) |
---|
92 | cc -o consult consult.o userint.o $(core) |
---|
93 | |
---|
94 | |
---|
95 | # C4.5 production rule interpreter |
---|
96 | |
---|
97 | consultr: consultr.o rules.o userint.o $(core) |
---|
98 | # lint -x consultr.ln rules.ln userint.ln $(core.ln) |
---|
99 | cc -o consultr consultr.o rules.o userint.o $(core) |
---|
100 | |
---|
101 | |
---|
102 | .c.o: |
---|
103 | # lint -c $< |
---|
104 | cc $(CFLAGS) -c $< |
---|
105 | |
---|
106 | |
---|
107 | |
---|
108 | |
---|
109 | # Make everything |
---|
110 | |
---|
111 | all: |
---|
112 | make c4.5 |
---|
113 | make c4.5rules |
---|
114 | make consult |
---|
115 | make consultr |
---|
116 | cc -o xval-prep xval-prep.c |
---|
117 | cc -o average average.c -lm |
---|
118 | |
---|
119 | |
---|
120 | $(trees): defns.i types.i extern.i |
---|
121 | $(rules): defns.i types.i extern.i |
---|