ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/Rmakefile
Revision: 2.15
Committed: Thu Dec 9 17:31:10 1993 UTC (30 years, 4 months ago) by greg
Branch: MAIN
Changes since 2.14: +2 -1 lines
Log Message:
Added MLIB definition for alternate math libraries

File Contents

# User Rev Content
1 greg 1.56 #
2 greg 1.1 # SCCSid "$SunId$ LBL"
3 greg 2.2 # Compiles for ray tracing programs.
4 greg 1.1 #
5    
6 greg 1.66 OPT = -O
7 greg 1.68 MACH = -DBSD
8 greg 1.59 CFLAGS = $(MACH) $(OPT) -I../common -L../lib
9 greg 1.67 SPECIAL = aed
10 greg 1.26 CC = cc
11 greg 2.15 MLIB = -lm
12 greg 1.35 LINT = lint
13 greg 1.68 LINTFLAGS = -DBSD -DVARIABLE -DFUNCTION \
14     -DINCHAN -DRCONST -DREDEFW
15 greg 1.1
16     #
17     # The following are user-definable:
18     #
19     DESTDIR = .
20 greg 1.66 INSTDIR = /usr/local/bin
21 greg 1.5 INSTALL = cp
22 greg 1.1
23     #
24     # The following paths must exist and be relative to root:
25     #
26 greg 1.33 DEVDIR = $(INSTDIR)/dev
27 greg 1.1 LIBDIR = /usr/local/lib/ray
28    
29     #
30 greg 1.2 # Library routines:
31 greg 1.1 #
32 greg 2.15 LIBS = -lrt $(MLIB)
33 greg 1.1
34     #
35     # Device drivers for rview (see also devtable.c):
36     #
37 greg 1.39 DOBJS = devtable.o devcomm.o editline.o x11.o x11twind.o \
38     colortab.o
39 greg 1.46 DSRC = devtable.c devcomm.c editline.c x11.c x11twind.c \
40 greg 1.39 colortab.c
41     DLIBS = -lX11
42 greg 1.1
43     #
44     # Standard object files:
45     #
46    
47 greg 2.11 RTOBJS = rtmain.o rtrace.o duphead.o persist.o preload.o $(ROBJS) Version.o
48 greg 1.62 RTSRC = rmain.c rtrace.c $(RSRC) Version.c
49 greg 1.1
50 greg 2.11 RPOBJS = rpmain.o rpict.o duphead.o persist.o preload.o $(ROBJS) Version.o
51 greg 1.62 RPSRC = rmain.c rpict.c $(RSRC) Version.c
52 greg 1.1
53 greg 2.12 RVOBJS = rvmain.o rview.o rv2.o rv3.o freeobjmem.o $(DOBJS) $(ROBJS) Version.o
54     RVSRC = rmain.c rview.c rv2.c rv3.c freeobjmem.c $(DSRC) $(RSRC) Version.c
55 greg 1.1
56 greg 1.51 ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \
57 greg 1.61 $(MODOBJS) $(SUPPOBJS)
58 greg 1.51 RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \
59     $(MODSRC) $(SUPPSRC)
60 greg 1.1
61 greg 2.7 RAYOBJS = initotypes.o raytrace.o ambient.o ambcomp.o ambio.o
62     RAYSRC = initotypes.c raytrace.c ambient.c ambcomp.c ambio.c
63 greg 1.1
64 greg 1.64 SURFOBJS = source.o sphere.o srcsupp.o srcsamp.o virtuals.o o_face.o \
65     o_cone.o o_instance.o
66 greg 1.51 SURFSRC = sphere.c source.c srcsupp.c virtuals.c o_face.c \
67 greg 1.64 srcsamp.c o_cone.c o_instance.c
68 greg 1.1
69 greg 2.3 MATOBJS = aniso.o normal.o dielectric.o m_clip.o glass.o m_brdf.o \
70 greg 2.14 m_mirror.o m_direct.o fprism.o
71 greg 2.13 MATSRC = aniso.c normal.c dielectric.c m_clip.c glass.c m_brdf.c \
72 greg 2.14 m_mirror.c m_direct.c fprism.c
73 greg 1.1
74 greg 1.3 MODOBJS = p_func.o t_func.o p_data.o t_data.o text.o mx_func.o mx_data.o
75 greg 1.35 MODSRC = p_func.c t_func.c p_data.c t_data.c text.c mx_func.c mx_data.c
76 greg 1.1
77 greg 1.61 SUPPOBJS = zeroes.o calexpr.o caldefn.o func.o noise3.o data.o readfargs.o \
78     malloc.o
79     SUPPSRC = zeroes.c calexpr.c caldefn.c func.c noise3.c data.c readfargs.c \
80     malloc.c
81 greg 1.1
82 greg 1.62 HEADERS = ambient.h ray.h data.h otspecial.h source.h
83    
84 greg 1.1 #
85     # What this makefile produces:
86     #
87    
88     PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rview $(DESTDIR)/lookamb
89    
90 greg 1.67 all: $(PROGS) $(SPECIAL)
91 greg 1.1
92 greg 1.67 install: $(PROGS) $(SPECIAL) rayinit.cal
93 greg 1.1 $(INSTALL) $(PROGS) $(INSTDIR)
94 greg 1.58 rm -f $(LIBDIR)/rayinit.cal
95     cp rayinit.cal $(LIBDIR)
96 greg 1.1
97 greg 1.39 sun: $(DEVDIR)/sun $(DEVDIR)/sun.com
98    
99     x10: $(DEVDIR)/x10
100    
101 greg 1.40 aed: $(DEVDIR)/aed
102 greg 1.39
103 greg 1.69 sgi: $(DEVDIR)/news
104    
105 greg 1.57 tiff:
106    
107 greg 1.1 clean:
108 greg 1.41 set nonomatch; rm -f $(PROGS) *.o core
109 greg 1.35
110     lint: $(RVSRC)
111     $(LINT) $(LINTFLAGS) -DRVIEW $(RVSRC) $(LIBS)
112 greg 1.1
113     #
114     # Links:
115     #
116    
117 greg 1.59 $(DESTDIR)/rtrace: $(RTOBJS)
118 greg 1.26 $(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS)
119 greg 1.1
120 greg 1.59 $(DESTDIR)/rpict: $(RPOBJS)
121 greg 1.26 $(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS)
122 greg 1.1
123 greg 1.59 $(DESTDIR)/rview: $(RVOBJS)
124 greg 1.26 $(CC) $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS)
125 greg 1.1
126 greg 2.7 $(DESTDIR)/lookamb: lookamb.o ambio.o
127     $(CC) $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o ambio.o -lrt
128 greg 1.1
129 greg 1.33 $(DEVDIR)/sun: sundev.o devmain.o colortab.o editline.o
130     $(CC) $(CFLAGS) -s -o $(DEVDIR)/sun devmain.o sundev.o colortab.o \
131 greg 1.22 editline.o -lsuntool -lsunwindow -lpixrect $(LIBS)
132 greg 1.1
133     $(DEVDIR)/sun.com: suncom.o editline.o
134 greg 1.33 $(CC) $(CFLAGS) -s -o $(DEVDIR)/sun.com suncom.o editline.o
135 greg 1.1
136 greg 1.39 $(DEVDIR)/x10: x10.o xtwind.o colortab.o devmain.o editline.o
137     $(CC) $(CFLAGS) -s -o $(DEVDIR)/x10 x10.o xtwind.o devmain.o \
138     colortab.o editline.o -lX $(LIBS)
139 greg 1.15
140 greg 1.40 $(DEVDIR)/aed: aed.o colortab.o tty.o devmain.o editline.o
141     $(CC) $(CFLAGS) -s -o $(DEVDIR)/aed aed.o colortab.o \
142     devmain.o tty.o editline.o $(LIBS)
143    
144 greg 1.69 $(DEVDIR)/news: nwsdev.o devmain.o editline.o
145     $(CC) $(CFLAGS) -s -o $(DEVDIR)/news nwsdev.o devmain.o editline.o \
146     -lcps $(LIBS)
147    
148 greg 1.1 #
149     # Special compiles:
150     #
151    
152     rtmain.o: rmain.c
153 greg 1.26 $(CC) $(CFLAGS) -DRTRACE -DNICE=4 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
154 greg 1.1 mv rmain.o rtmain.o
155    
156     rpmain.o: rmain.c
157 greg 1.26 $(CC) $(CFLAGS) -DRPICT -DNICE=6 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
158 greg 1.1 mv rmain.o rpmain.o
159    
160     rvmain.o: rmain.c
161 greg 1.26 $(CC) $(CFLAGS) -DRVIEW -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
162 greg 1.1 mv rmain.o rvmain.o
163 greg 1.56
164     readfargs.o: readfargs.c ../common/object.h
165     $(CC) $(CFLAGS) -DMEMHOG -c readfargs.c
166 greg 1.60
167     malloc.o: malloc.c
168     $(CC) $(CFLAGS) -DMCOMP -c malloc.c
169 greg 1.1
170     #
171 greg 1.51 # Uncomment the following to model dispersion:
172 greg 1.1 #
173 greg 1.55 dielectric.o: dielectric.c source.h
174     $(CC) $(CFLAGS) -DDISPERSE -c dielectric.c
175    
176 greg 1.1 # end of dispersion compiles.
177    
178 greg 1.33 devcomm.o: devcomm.c
179     $(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c
180    
181 greg 1.1 sundev.o: sundev.c
182 greg 1.33 $(CC) $(CFLAGS) -DTTYPROG=\"$(DEVDIR)/sun.com\" -Dsun_init=dinit -c sundev.c
183 greg 1.1
184 greg 1.39 x10.o: x10.c
185     $(CC) $(CFLAGS) -Dx_init=dinit -c x10.c
186 greg 1.40
187     aed.o: aed.c
188     $(CC) $(CFLAGS) -Daed_init=dinit -c aed.c
189 greg 1.1
190 greg 1.53 calexpr.o: calexpr.c ../common/calcomp.h
191 greg 1.26 $(CC) $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c
192 greg 1.1
193 greg 1.53 caldefn.o: caldefn.c ../common/calcomp.h
194     $(CC) $(CFLAGS) -DFUNCTION -DREDEFW -c caldefn.c
195 greg 1.1
196 greg 1.27 nwsdev.o: nwsdev.c nwsdev.h newsconstants.h
197 greg 1.69 $(CC) $(CFLAGS) -Dnws_init=dinit -c nwsdev.c
198 greg 1.27
199     nwsdev.h: nwsdev.cps newsconstants.h
200     cps nwsdev.cps
201 greg 1.62
202     #
203     # Version module:
204     #
205    
206 greg 1.63 Version.c: VERSION $(RSRC) $(HEADERS)
207     ( cat VERSION ; date ; whoami ; hostname ) > Version.c
208 greg 1.62 ed - Version.c < verscript.ed
209 greg 1.27
210 greg 1.1 #
211     # Include dependencies:
212     #
213    
214 greg 2.7 aed.o ambio.o colortab.o data.o devcomm.o \
215 greg 1.52 devmain.o lookamb.o rview.o sundev.o x10.o x11.o: ../common/color.h
216 greg 1.1
217 greg 1.54 o_cone.o srcsupp.o: ../common/cone.h
218 greg 1.1
219 greg 1.37 data.o m_brdf.o mx_data.o p_data.o t_data.o: data.h
220 greg 1.1
221 greg 1.19 aed.o devcomm.o devmain.o devtable.o \
222 greg 1.27 editline.o nwsdev.o sundev.o tty.o x10.o x11.o: driver.h
223 greg 1.1
224 greg 1.52 o_face.o srcsupp.o: ../common/face.h
225 greg 1.1
226 greg 1.51 ambient.o raytrace.o rpmain.o rtmain.o \
227 greg 1.52 rtrace.o rvmain.o rv2.o rv3.o source.o: ../common/octree.h
228 greg 1.1
229 greg 1.52 o_instance.o: ../common/instance.h ../common/octree.h
230 greg 1.1
231 greg 2.3 ambient.o aniso.o dielectric.o func.o initotypes.o m_brdf.o \
232 greg 2.12 normal.o o_cone.o text.o raytrace.o rtrace.o freeobjmem.o \
233 greg 1.52 rv2.o source.o srcsupp.o virtuals.o sphere.o: ../common/otypes.h
234 greg 1.1
235 greg 2.3 ambient.o ambcomp.o aniso.o normal.o rpict.o \
236 greg 2.4 rv3.o srcsamp.o virtuals.o: ../common/random.h
237 greg 1.1
238 greg 2.3 ambient.o ambcomp.o aniso.o dielectric.o func.o glass.o m_clip.o m_mirror.o \
239 greg 1.37 m_brdf.o mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \
240 greg 1.24 p_data.o p_func.o text.o raytrace.o rpmain.o rtmain.o rvmain.o rpict.o \
241 greg 1.65 rtrace.o rview.o rv2.o rv3.o source.o srcsamp.o srcsupp.o virtuals.o \
242 greg 2.11 sphere.o t_data.o t_func.o persist.o duphead.o: ray.h ../common/standard.h \
243 greg 1.65 ../common/mat4.h ../common/fvect.h ../common/object.h ../common/color.h
244 greg 1.1
245 greg 1.52 rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h
246 greg 1.1
247 greg 1.70 m_direct.o m_mirror.o \
248     source.o srcsamp.o srcsupp.o virtuals.o: source.h
249 greg 1.1
250 greg 2.14 cone.o data.o devcomm.o freeobjmem.o initotypes.o fprism.o \
251 greg 1.65 octree.o: ../common/standard.h ../common/mat4.h ../common/fvect.h
252 greg 1.38
253 greg 1.44 initotypes.o raytrace.o: otspecial.h
254    
255 greg 1.1 sundev.o: suntools.icon
256    
257 greg 1.52 rpmain.o rtmain.o rvmain.o rpict.o: ../common/view.h
258 greg 1.1
259     x10.o xtwind.o: xtwind.h
260 greg 1.15
261     x11.o x11twind.o: x11twind.h
262 greg 1.42
263     x11.o: x11icon.h
264 greg 1.47
265 greg 2.7 ambient.o ambcomp.o ambio.o lookamb.o: ambient.h
266 greg 1.70
267 greg 2.6 data.o rmain.o rpict.o rtrace.o rv2.o: ../common/resolu.h
268 greg 2.2
269 greg 2.3 aniso.o func.o m_brdf.o m_direct.o mx_data.o mx_func.o p_data.o \
270 greg 2.2 p_func.o t_data.o t_func.o: func.h
271 greg 2.12
272     freeobjmem.o: ../common/object.h
273 greg 2.5
274     devcomm.o: ../common/vfork.h
275 greg 2.9
276 greg 2.11 rtmain.o rpmain.o rvmain.o persist.o duphead.o rpict.o: ../common/paths.h