Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Analysis.AlgorithmBehavior/qhull-2012.1/src/libqhull/Mborland @ 10635

Last change on this file since 10635 was 10207, checked in by ascheibe, 11 years ago

#1886 added a unit test for volume calculation and the qhull library

File size: 6.1 KB
Line 
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
16CC      = bcc32    # 32 bit compiler for DOS
17       # bcc32i - Intel's compiler
18LINKER  = $(CC)    # bcc calls tlink32 with needed options
19CFLAGS  = -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)
26LFLAGS  = -WX -w-   # -WX loads DPMI library
27!else
28LFLAGS  = -lap -lx -lc
29          # -lap 32-bit console application
30          # -lx no map file
31          # -lc case is significant
32!endif
33
34EXERB = rbox
35EXEQH = qhull
36EXEQC = qconvex
37EXEQD = qdelaunay
38EXEQV = qvoronoi
39EXEQF = qhalf
40EXEEG = user_eg
41EXEEG2 = user_eg2
42
43TMPFILE = BCC32tmp.cfg
44
45OBJS1 =   global.obj stat.obj geom2.obj poly2.obj merge.obj
46OBJS2 =   libqhull.obj geom.obj poly.obj qset.obj mem.obj
47OBJS3 =   random.obj usermem.obj userprintf.obj io.obj user.obj
48OBJS4 =   rboxlib.obj random.obj usermem.obj userprintf_rbox.obj
49
50HFILES1 = 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
60all:    $(EXERB) $(EXEQH) $(EXEQC) $(EXEQD) $(EXEQV) $(EXEQF) test
61
62help:
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
79unix.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
90qconvex.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
101qdelaun.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
112qvoronoi.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
123qhalf.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
134user_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
145user_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
156rbox.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
164test:   
165  @..\..\bin\rbox D4 > test.x
166  @..\..\bin\qhull <test.x
167  @del test.x
168
169# Clean up
170
171clean:
172  @del *.obj
173  @del $(TMPFILE)
174
175cleanall: 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
189new:      cleanall all
190
191# Header file dependencies
192
193libqhull.obj stat.obj user.obj global.obj usermem.obj userprintf.obj: $(HFILES1)
194random.obj:  libqhull.h random.h
195geom.obj geom2.obj:  $(HFILES1) geom.h
196poly.obj poly2.obj:  $(HFILES1) poly.h
197io.obj:     $(HFILES1) io.h
198merge.obj:  $(HFILES1) merge.h
199mem.obj:    mem.h
200qset.obj:   qset.h mem.h
201unix.obj:   libqhull.h user.h
202qconvex.obj:   libqhull.h user.h
203qdelaun.obj:   libqhull.h user.h
204qhalf.obj:   libqhull.h user.h
205qvoronoi.obj:   libqhull.h user.h
206rbox.obj:   user.h
Note: See TracBrowser for help on using the repository browser.