ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/Rmakefile
Revision: 2.46
Committed: Thu Oct 21 21:44:59 2004 UTC (20 years ago) by greg
Branch: MAIN
CVS Tags: rad3R6
Changes since 2.45: +2 -2 lines
Log Message:
Fixed typo that caused Version.c to be rebuilt inappropriately

File Contents

# Content
1 # RCSid: $Id: Rmakefile,v 2.45 2004/03/30 20:40:04 greg Exp $
2 #
3 # Compiles for ray tracing programs.
4 #
5
6 OPT = -O
7 MACH = -DBSD
8 CFLAGS = -I../common -L../lib $(OPT) $(MACH)
9 SPECIAL = aed
10 CC = cc
11 MLIB = -lm
12 LINT = lint
13 LINTFLAGS = -DBSD
14
15 #
16 # The following are user-definable:
17 #
18 DESTDIR = .
19 INSTDIR = /usr/local/bin
20 INSTALL = cp
21
22 #
23 # The following paths must exist and be relative to root:
24 #
25 DEVDIR = $(INSTDIR)/dev
26 LIBDIR = /usr/local/lib/ray
27
28 #
29 # Library routines:
30 #
31 RLIB = ../lib/libradiance.a
32 RCLIB = ../lib/libraycalls.a
33 LIBS = -lrt $(MLIB)
34
35 #
36 # Device drivers for rvu (see also devtable.c):
37 #
38 DOBJS = devtable.o devcomm.o editline.o x11.o x11twind.o \
39 colortab.o
40 DSRC = devtable.c devcomm.c editline.c x11.c x11twind.c \
41 colortab.c
42 DLIBS = -lX11
43
44 #
45 # Standard object files:
46 #
47
48 RTOBJS = rtmain.o rtrace.o duphead.o persist.o
49 RTSRC = rtmain.c rtrace.c duphead.c persist.c
50
51 RPOBJS = rpmain.o rpict.o srcdraw.o duphead.o persist.o
52 RPSRC = rpmain.c rpict.c srcdraw.c duphead.c persist.c
53
54 RVOBJS = rvmain.o rview.o rv2.o rv3.o $(DOBJS)
55 RVSRC = rvmain.c rview.c rv2.c rv3.c $(DSRC)
56
57 RLOBJS = raycalls.o raypcalls.o
58 RLSRC = raycalls.c raypcalls.c
59
60 ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \
61 $(MODOBJS) $(SUPPOBJS)
62 RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \
63 $(MODSRC) $(SUPPSRC)
64
65 RAYOBJS = ambcomp.o ambient.o ambio.o freeobjmem.o initotypes.o \
66 preload.o raytrace.o renderopts.o
67 RAYSRC = ambcomp.c ambient.c ambio.c freeobjmem.c initotypes.c \
68 preload.c raytrace.c renderopts.c
69
70 SURFOBJS = source.o sphere.o srcobstr.o srcsupp.o srcsamp.o virtuals.o \
71 o_face.o o_cone.o o_instance.o o_mesh.o
72 SURFSRC = sphere.c source.c srcobstr.c srcsupp.c srcsamp.c virtuals.c \
73 o_face.c srcsamp.c o_cone.c o_instance.c o_mesh.c
74
75 MATOBJS = aniso.o normal.o dielectric.o m_clip.o glass.o m_brdf.o \
76 m_mirror.o m_direct.o m_mist.o fprism.o m_alias.o
77 MATSRC = aniso.c normal.c dielectric.c m_clip.c glass.c m_brdf.c \
78 m_mirror.c m_direct.c m_mist.c fprism.c m_alias.c
79
80 MODOBJS = p_func.o t_func.o p_data.o t_data.o text.o mx_func.o mx_data.o
81 MODSRC = p_func.c t_func.c p_data.c t_data.c text.c mx_func.c mx_data.c
82
83 SUPPOBJS = func.o noise3.o data.o
84 SUPPSRC = func.c noise3.c data.c
85
86 HEADERS = ambient.h ray.h data.h otspecial.h source.h
87
88 #
89 # What this makefile produces:
90 #
91
92 PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rvu $(DESTDIR)/lookamb
93
94 all: $(PROGS) $(RCLIB) $(SPECIAL)
95
96 install: all rayinit.cal
97 $(INSTALL) $(PROGS) $(INSTDIR)
98 cd $(INSTDIR) ; rm -f rview ; ln -s rvu rview
99 rm -f $(LIBDIR)/rayinit.cal
100 cp rayinit.cal $(LIBDIR)
101
102 aed: $(DEVDIR)/aed
103
104 ogl:
105
106 clean:
107 set nonomatch; rm -f $(PROGS) *.o core
108
109 lint: $(RVSRC)
110 $(LINT) $(LINTFLAGS) -DRVIEW $(RVSRC) $(LIBS)
111
112 #
113 # Links:
114 #
115
116 $(DESTDIR)/rtrace: $(RTOBJS) $(RLIB)
117 $(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(RLIB) $(LIBS)
118
119 $(DESTDIR)/rpict: $(RPOBJS) $(RLIB)
120 $(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(RLIB) $(LIBS)
121
122 $(DESTDIR)/rvu: $(RVOBJS) $(RLIB)
123 $(CC) $(CFLAGS) -o $(DESTDIR)/rvu $(RVOBJS) $(RLIB) $(LIBS) $(DLIBS)
124
125 $(DESTDIR)/lookamb: lookamb.o ambio.o
126 $(CC) $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o ambio.o $(LIBS)
127
128 $(DEVDIR)/aed: aed.o colortab.o tty.o devmain.o editline.o
129 $(CC) $(CFLAGS) -s -o $(DEVDIR)/aed aed.o colortab.o \
130 devmain.o tty.o editline.o $(LIBS)
131
132 $(RLIB): $(ROBJS) Version.o
133 ar rc $(RLIB) $(ROBJS) Version.o
134 -ranlib $(RLIB)
135
136 $(RCLIB): $(RLOBJS)
137 ar rc $(RCLIB) $(RLOBJS)
138 -ranlib $(RCLIB)
139
140 #
141 # Special compiles:
142 #
143
144 rtmain.o: rtmain.c
145 $(CC) $(CFLAGS) -DNICE=4 -c rtmain.c
146
147 rpmain.o: rpmain.c
148 $(CC) $(CFLAGS) -DNICE=6 -c rpmain.c
149
150 rvmain.o: rvmain.c
151 $(CC) $(CFLAGS) -c rvmain.c
152
153 #
154 # Uncomment the following to model dispersion:
155 #
156 dielectric.o: dielectric.c source.h
157 $(CC) $(CFLAGS) -DDISPERSE -c dielectric.c
158
159 # end of dispersion compiles.
160
161 devcomm.o: devcomm.c
162 $(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c
163
164 aed.o: aed.c
165 $(CC) $(CFLAGS) -Daed_init=dinit -c aed.c
166
167 #
168 # Version module:
169 #
170
171 Version.c: VERSION $(RSRC) $(HEADERS)
172 ( cat VERSION ; date ; whoami ; hostname ) > Version.c
173 ed - Version.c < verscript.ed
174
175 #
176 # Include dependencies:
177 #
178
179 aed.o ambio.o colortab.o data.o devcomm.o \
180 devmain.o lookamb.o rview.o x11.o: ../common/color.h
181
182 freeobjmem.o o_cone.o srcsupp.o: ../common/cone.h
183
184 data.o freeobjmem.o m_brdf.o mx_data.o \
185 p_data.o raycalls.o t_data.o: data.h
186
187 aed.o devcomm.o devmain.o devtable.o \
188 editline.o tty.o x11.o: driver.h
189
190 freeobjmem.o o_face.o srcsupp.o: ../common/face.h
191
192 ambient.o raytrace.o rpmain.o rtmain.o \
193 rtrace.o rvmain.o rv2.o rv3.o: ../common/octree.h
194
195 o_instance.o: ../common/instance.h
196
197 ambient.o aniso.o dielectric.o freeobjmem.o func.o glass.o initotypes.o \
198 m_brdf.o m_direct.o m_mirror.o normal.o o_cone.o preload.o \
199 raycalls.o raytrace.o rtrace.o rv2.o source.o sphere.o srcsupp.o text.o \
200 srcobstr.o virtuals.o: ../common/otypes.h
201
202 ambient.o ambcomp.o aniso.o normal.o raycalls.o rpict.o rvmain.o \
203 rtmain.o rpmain.o persist.o source.o rv3.o \
204 srcsamp.o virtuals.o: ../common/random.h
205
206 ambcomp.o ambient.o aniso.o dielectric.o freeobjmem.o func.o glass.o \
207 m_brdf.o m_clip.o m_direct.o m_mirror.o m_mist.o mx_data.o o_mesh.o \
208 mx_func.o normal.o o_cone.o o_face.o o_instance.o p_data.o p_func.o \
209 raycalls.o raypcalls.o raytrace.o rpict.o rtrace.o rv2.o rv3.o rview.o \
210 source.o sphere.o srcdraw.o srcobstr.o srcsamp.o srcsupp.o t_data.o t_func.o \
211 text.o rpmain.o rtmain.o rvmain.o virtuals.o m_alias.o: ray.h \
212 ../common/standard.h ../common/rtmisc.h ../common/rtio.h ../common/rtmath.h \
213 ../common/rterror.h ../common/octree.h \
214 ../common/mat4.h ../common/fvect.h ../common/object.h ../common/color.h
215
216 rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h ../common/resolu.h
217
218 m_direct.o m_mirror.o m_mist.o dielectric.o raycalls.o \
219 rpict.o rpmain.o rtmain.o rvmain.o source.o srcdraw.o \
220 srcobstr.o srcsamp.o srcsupp.o virtuals.o: source.h
221
222 cone.o data.o devcomm.o initotypes.o fprism.o preload.o \
223 duphead.o octree.o: ../common/standard.h ../common/rtmisc.h \
224 ../common/rtio.h ../common/rtmath.h \
225 ../common/rterror.h ../common/mat4.h ../common/fvect.h
226
227 ambio.o: ../common/fvect.h
228
229 initotypes.o srcobstr.o raytrace.o: otspecial.h
230
231 rpmain.o rtmain.o rvmain.o rpict.o \
232 srcdraw.o: ../common/view.h ../common/resolu.h
233
234 x11.o x11twind.o: x11twind.h
235
236 x11.o: x11icon.h
237
238 ambient.o ambcomp.o ambio.o lookamb.o raycalls.o: ambient.h
239
240 data.o rpmain.o rtmain.o rvmain.o rpict.o rtrace.o \
241 rv2.o: ../common/resolu.h
242
243 aniso.o func.o m_brdf.o m_direct.o mx_data.o mx_func.o p_data.o \
244 p_func.o t_data.o t_func.o: func.h ../common/calcomp.h
245
246 preload.o: ../common/object.h ../common/face.h ../common/cone.h \
247 ../common/instance.h ../common/mesh.h ../common/color.h data.h
248
249 rtmain.o rpmain.o rvmain.o persist.o duphead.o \
250 renderopts.o rpict.o: ../common/paths.h
251
252 freeobjmem.o raycalls.o text.o: ../common/font.h
253
254 raypcalls.o: ../common/selcall.h
255
256 o_mesh.o: ../common/mesh.h
257
258 noise3.o: ../common/calcomp.h