1 | #########################################################################
|
---|
2 | # Borland C++ 4.02 for Win32 and DOS Power Pack #
|
---|
3 | # Makefile for qhull and rbox #
|
---|
4 | # #
|
---|
5 | # make -fMborland all to produce qconvex, qhull, and rbox #
|
---|
6 | # make -fMborland user_eg to produce user_eg #
|
---|
7 | # make -fMborland user_eg2 to produce user_eg2 #
|
---|
8 | # make -fMborland new to rebuild qhull and rbox from source #
|
---|
9 | # make -fMborland clean to remove object files #
|
---|
10 | # make -fMborland cleanall to remove all generated files #
|
---|
11 | # make -fMborland test to test rbox and qhull #
|
---|
12 | # #
|
---|
13 | # Author: D. Zwick of Germany, C.B. Barber #
|
---|
14 | #########################################################################
|
---|
15 |
|
---|
16 | CC = bcc32 # 32 bit compiler for DOS
|
---|
17 | # bcc32i - Intel's compiler
|
---|
18 | LINKER = $(CC) # bcc calls tlink32 with needed options
|
---|
19 | CFLAGS = -w- -A -O2
|
---|
20 | # -w- no warnings, bcc doesn't handle assigns in conditions
|
---|
21 | # -A Ansi standard
|
---|
22 | # -X no auto-dependency outputs
|
---|
23 | # -v debugging, use CCOPTS for both
|
---|
24 | # -O2 optimization
|
---|
25 | !if $d(_DPMI)
|
---|
26 | LFLAGS = -WX -w- # -WX loads DPMI library
|
---|
27 | !else
|
---|
28 | LFLAGS = -lap -lx -lc
|
---|
29 | # -lap 32-bit console application
|
---|
30 | # -lx no map file
|
---|
31 | # -lc case is significant
|
---|
32 | !endif
|
---|
33 |
|
---|
34 | EXERB = rbox
|
---|
35 | EXEQH = qhull
|
---|
36 | EXEQC = qconvex
|
---|
37 | EXEQD = qdelaunay
|
---|
38 | EXEQV = qvoronoi
|
---|
39 | EXEQF = qhalf
|
---|
40 | EXEEG = user_eg
|
---|
41 | EXEEG2 = user_eg2
|
---|
42 |
|
---|
43 | TMPFILE = BCC32tmp.cfg
|
---|
44 |
|
---|
45 | OBJS1 = global.obj stat.obj geom2.obj poly2.obj merge.obj
|
---|
46 | OBJS2 = libqhull.obj geom.obj poly.obj qset.obj mem.obj
|
---|
47 | OBJS3 = random.obj usermem.obj userprintf.obj io.obj user.obj
|
---|
48 | OBJS4 = rboxlib.obj random.obj usermem.obj userprintf_rbox.obj
|
---|
49 |
|
---|
50 | HFILES1 = libqhull.h stat.h qhull_a.h user.h
|
---|
51 |
|
---|
52 |
|
---|
53 | # General rules
|
---|
54 |
|
---|
55 | .c.obj:
|
---|
56 | $(CC) -c $(CFLAGS) $<
|
---|
57 |
|
---|
58 | # Default
|
---|
59 |
|
---|
60 | all: $(EXERB) $(EXEQH) $(EXEQC) $(EXEQD) $(EXEQV) $(EXEQF) test
|
---|
61 |
|
---|
62 | help:
|
---|
63 | @echo USAGE:
|
---|
64 | @echo "make all to produce qhull, rbox, qconvex, qdelaun, qvoronoi, qhalf"
|
---|
65 | @echo "make user_eg to produce user_eg"
|
---|
66 | @echo "make user_eg2 to produce user_eg2"
|
---|
67 | @echo "make new to rebuild qhull and rbox from source"
|
---|
68 | @echo "make clean to remove object files"
|
---|
69 | @echo "make cleanall to remove all generated file"
|
---|
70 | @echo "make test to test rbox and qhull"
|
---|
71 | @echo OPTIONS (default is 32-bit console app):
|
---|
72 | @echo "-D_DPMI for C++ 4.01 and DOS Power Pack"
|
---|
73 |
|
---|
74 | # Executables
|
---|
75 |
|
---|
76 | $(EXEQH): ..\..\bin\$(EXEQH).exe
|
---|
77 | @echo Made ..\..\bin\$(EXEQH).exe
|
---|
78 |
|
---|
79 | unix.obj: ..\qhull\unix.c
|
---|
80 | ..\..\bin\$(EXEQH).exe: unix.obj $(OBJS1) $(OBJS2) $(OBJS3)
|
---|
81 | @echo unix.obj > $(TMPFILE)
|
---|
82 | @echo $(OBJS1) >> $(TMPFILE)
|
---|
83 | @echo $(OBJS2) >> $(TMPFILE)
|
---|
84 | @echo $(OBJS3) >> $(TMPFILE)
|
---|
85 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
86 |
|
---|
87 | $(EXEQC): ..\..\bin\$(EXEQC).exe
|
---|
88 | @echo Made ..\..\bin\$(EXEQC).exe
|
---|
89 |
|
---|
90 | qconvex.obj: ..\qconvex\qconvex.c
|
---|
91 | ..\..\bin\$(EXEQC).exe: qconvex.obj $(OBJS1) $(OBJS2) $(OBJS3)
|
---|
92 | @echo qconvex.obj > $(TMPFILE)
|
---|
93 | @echo $(OBJS1) >> $(TMPFILE)
|
---|
94 | @echo $(OBJS2) >> $(TMPFILE)
|
---|
95 | @echo $(OBJS3) >> $(TMPFILE)
|
---|
96 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
97 |
|
---|
98 | $(EXEQD): ..\..\bin\$(EXEQD).exe
|
---|
99 | @echo Made ..\..\bin\$(EXEQD).exe
|
---|
100 |
|
---|
101 | qdelaun.obj: ..\qdelaunay\qdelaun.c
|
---|
102 | ..\..\bin\$(EXEQD).exe: qdelaun.obj $(OBJS1) $(OBJS2) $(OBJS3)
|
---|
103 | @echo qdelaun.obj > $(TMPFILE)
|
---|
104 | @echo $(OBJS1) >> $(TMPFILE)
|
---|
105 | @echo $(OBJS2) >> $(TMPFILE)
|
---|
106 | @echo $(OBJS3) >> $(TMPFILE)
|
---|
107 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
108 |
|
---|
109 | $(EXEQV): ..\..\bin\$(EXEQV).exe
|
---|
110 | @echo Made ..\..\bin\$(EXEQV).exe
|
---|
111 |
|
---|
112 | qvoronoi.obj: ..\qvoronoi\qvoronoi.c
|
---|
113 | ..\..\bin\$(EXEQV).exe: qvoronoi.obj $(OBJS1) $(OBJS2) $(OBJS3)
|
---|
114 | @echo qvoronoi.obj > $(TMPFILE)
|
---|
115 | @echo $(OBJS1) >> $(TMPFILE)
|
---|
116 | @echo $(OBJS2) >> $(TMPFILE)
|
---|
117 | @echo $(OBJS3) >> $(TMPFILE)
|
---|
118 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
119 |
|
---|
120 | $(EXEQF): ..\..\bin\$(EXEQF).exe
|
---|
121 | @echo Made ..\..\bin\$(EXEQF).exe
|
---|
122 |
|
---|
123 | qhalf.obj: ..\qhalf\qhalf.c
|
---|
124 | ..\..\bin\$(EXEQF).exe: qhalf.obj $(OBJS1) $(OBJS2) $(OBJS3)
|
---|
125 | @echo qhalf.obj > $(TMPFILE)
|
---|
126 | @echo $(OBJS1) >> $(TMPFILE)
|
---|
127 | @echo $(OBJS2) >> $(TMPFILE)
|
---|
128 | @echo $(OBJS3) >> $(TMPFILE)
|
---|
129 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
130 |
|
---|
131 | $(EXEEG): ..\..\bin\$(EXEEG).exe
|
---|
132 | @echo Made ..\..\bin\$(EXEEG).exe
|
---|
133 |
|
---|
134 | user_eg.obj: ..\user_eg\user_eg.c
|
---|
135 | ..\..\bin\$(EXEEG).exe: user_eg.obj $(OBJS1) $(OBJS2) $(OBJS3)
|
---|
136 | @echo user_eg.obj > $(TMPFILE)
|
---|
137 | @echo $(OBJS1) >> $(TMPFILE)
|
---|
138 | @echo $(OBJS2) >> $(TMPFILE)
|
---|
139 | @echo $(OBJS3) >> $(TMPFILE)
|
---|
140 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
141 |
|
---|
142 | $(EXEEG2): ..\..\bin\$(EXEEG2).exe
|
---|
143 | @echo Made ..\..\bin\$(EXEEG2).exe
|
---|
144 |
|
---|
145 | user_eg2.obj: ..\user_eg2\user_eg2.c
|
---|
146 | ..\..\bin\$(EXEEG2).exe: user_eg2.obj $(OBJS1) $(OBJS2) $(OBJS3)
|
---|
147 | @echo user_eg2.obj > $(TMPFILE)
|
---|
148 | @echo $(OBJS1) >> $(TMPFILE)
|
---|
149 | @echo $(OBJS2) >> $(TMPFILE)
|
---|
150 | @echo $(OBJS3) >> $(TMPFILE)
|
---|
151 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
152 |
|
---|
153 | $(EXERB): ..\..\bin\$(EXERB).exe
|
---|
154 | @echo Made ..\..\bin\$(EXERB).exe
|
---|
155 |
|
---|
156 | rbox.obj: ..\rbox\rbox.c
|
---|
157 | ..\..\bin\$(EXERB).exe: rbox.obj $(OBJS4)
|
---|
158 | @echo rbox.obj > $(TMPFILE)
|
---|
159 | @echo $(OBJS4) >> $(TMPFILE)
|
---|
160 | $(LINKER) -e$@ $(CFLAGS) $(LFLAGS) @$(TMPFILE)
|
---|
161 |
|
---|
162 | # Test rbox and qhull
|
---|
163 |
|
---|
164 | test:
|
---|
165 | @..\..\bin\rbox D4 > test.x
|
---|
166 | @..\..\bin\qhull <test.x
|
---|
167 | @del test.x
|
---|
168 |
|
---|
169 | # Clean up
|
---|
170 |
|
---|
171 | clean:
|
---|
172 | @del *.obj
|
---|
173 | @del $(TMPFILE)
|
---|
174 |
|
---|
175 | cleanall: clean
|
---|
176 | @del ..\..\bin\$(EXERB).exe
|
---|
177 | @del ..\..\bin\$(EXEQC).exe
|
---|
178 | @del ..\..\bin\$(EXEQD).exe
|
---|
179 | @del ..\..\bin\$(EXEQF).exe
|
---|
180 | @del ..\..\bin\$(EXEQH).exe
|
---|
181 | @del ..\..\bin\$(EXEQV).exe
|
---|
182 | @del ..\..\bin\$(EXEEG).exe
|
---|
183 | @del ..\..\bin\$(EXEEG2).exe
|
---|
184 | @del ..\q_test.x
|
---|
185 | @del ..\q_test.log.1
|
---|
186 |
|
---|
187 | # Clean up and rebuild all
|
---|
188 |
|
---|
189 | new: cleanall all
|
---|
190 |
|
---|
191 | # Header file dependencies
|
---|
192 |
|
---|
193 | libqhull.obj stat.obj user.obj global.obj usermem.obj userprintf.obj: $(HFILES1)
|
---|
194 | random.obj: libqhull.h random.h
|
---|
195 | geom.obj geom2.obj: $(HFILES1) geom.h
|
---|
196 | poly.obj poly2.obj: $(HFILES1) poly.h
|
---|
197 | io.obj: $(HFILES1) io.h
|
---|
198 | merge.obj: $(HFILES1) merge.h
|
---|
199 | mem.obj: mem.h
|
---|
200 | qset.obj: qset.h mem.h
|
---|
201 | unix.obj: libqhull.h user.h
|
---|
202 | qconvex.obj: libqhull.h user.h
|
---|
203 | qdelaun.obj: libqhull.h user.h
|
---|
204 | qhalf.obj: libqhull.h user.h
|
---|
205 | qvoronoi.obj: libqhull.h user.h
|
---|
206 | rbox.obj: user.h
|
---|