1 |
< |
# SCCSid "$SunId$ LBL" |
2 |
< |
|
1 |
> |
# RCSid: $Id$ |
2 |
|
# |
3 |
< |
# Compiles for ray tracing programs. |
3 |
> |
# Compiles for ray tracing programs. |
4 |
|
# |
5 |
|
|
6 |
< |
CFLAGS = -DBSD -O -DIEEE -f68881 /usr/lib/f68881.il |
6 |
> |
OPT = -O |
7 |
> |
MACH = -DBSD |
8 |
> |
CFLAGS = -I../common -L../lib $(OPT) $(MACH) |
9 |
> |
SPECIAL = |
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/ray |
19 |
> |
INSTDIR = /usr/local/bin |
20 |
|
INSTALL = cp |
21 |
|
|
22 |
|
# |
23 |
|
# The following paths must exist and be relative to root: |
24 |
|
# |
25 |
< |
DEVDIR = $(LIBDIR)/lib |
25 |
> |
DEVDIR = $(INSTDIR)/dev |
26 |
|
LIBDIR = /usr/local/lib/ray |
27 |
|
|
28 |
|
# |
29 |
|
# Library routines: |
30 |
|
# |
31 |
< |
LIBS = -lm |
32 |
< |
COMPAT = malloc.o |
31 |
> |
RLIB = ../lib/libradiance.a |
32 |
> |
RCLIB = ../lib/libraycalls.a |
33 |
> |
LIBS = -lrt $(MLIB) |
34 |
|
|
35 |
|
# |
36 |
< |
# Device drivers for rview (see also devtable.c): |
36 |
> |
# Device drivers for rvu (see also devtable.c): |
37 |
|
# |
38 |
< |
DOBJS = devtable.o devcomm.o aed.o tty.o editline.o sun.o x10.o xtwind.o |
39 |
< |
DLIBS = -lX |
40 |
< |
DRIVERS = $(DEVDIR)/sun.dev $(DEVDIR)/sun.com |
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 $(ROBJS) |
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 image.o $(ROBJS) |
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 image.o $(DOBJS) $(ROBJS) |
54 |
> |
RVOBJS = rvmain.o rview.o rv2.o rv3.o $(DOBJS) |
55 |
> |
RVSRC = rvmain.c rview.c rv2.c rv3.c $(DSRC) |
56 |
|
|
57 |
< |
ROBJS = $(OCTOBJS) $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ |
58 |
< |
$(MODOBJS) $(SUPPOBJS) $(MISCOBJS) $(COMPAT) |
57 |
> |
RLOBJS = raycalls.o raypcalls.o |
58 |
> |
RLSRC = raycalls.c raypcalls.c |
59 |
|
|
60 |
< |
OCTOBJS = octree.o readobj.o readoct.o objset.o otypes.o |
60 |
> |
ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ |
61 |
> |
$(MODOBJS) $(SUPPOBJS) |
62 |
> |
RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \ |
63 |
> |
$(MODSRC) $(SUPPSRC) |
64 |
|
|
65 |
< |
RAYOBJS = raytrace.o ambient.o |
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 = face.o sphere.o source.o o_face.o cone.o \ |
71 |
< |
o_cone.o o_instance.o instance.o |
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 = normal.o dielectric.o m_clip.o glass.o |
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 = zeroes.o calexpr.o caldefn.o calfunc.o func.o noise3.o data.o |
83 |
> |
SUPPOBJS = func.o noise3.o data.o |
84 |
> |
SUPPSRC = func.c noise3.c data.c |
85 |
|
|
86 |
< |
MISCOBJS = misc.o color.o header.o mat4.o xf.o fvect.o savestr.o ealloc.o |
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)/rview $(DESTDIR)/lookamb |
92 |
> |
PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rvu $(DESTDIR)/lookamb |
93 |
|
|
94 |
< |
all: $(PROGS) $(DRIVERS) |
94 |
> |
all: $(PROGS) $(RCLIB) $(SPECIAL) |
95 |
|
|
96 |
< |
install: all |
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 |
+ |
ogl: |
103 |
+ |
|
104 |
|
clean: |
105 |
< |
rm -f *.o core |
105 |
> |
set nonomatch; rm -f $(PROGS) *.o core |
106 |
|
|
107 |
+ |
lint: $(RVSRC) |
108 |
+ |
$(LINT) $(LINTFLAGS) -DRVIEW $(RVSRC) $(LIBS) |
109 |
+ |
|
110 |
|
# |
111 |
|
# Links: |
112 |
|
# |
113 |
|
|
114 |
< |
$(DESTDIR)/rtrace: $(RTOBJS) |
115 |
< |
cc $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS) |
114 |
> |
$(DESTDIR)/rtrace: $(RTOBJS) $(RLIB) |
115 |
> |
$(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(RLIB) $(LIBS) |
116 |
|
|
117 |
< |
$(DESTDIR)/rpict: $(RPOBJS) |
118 |
< |
cc $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS) |
117 |
> |
$(DESTDIR)/rpict: $(RPOBJS) $(RLIB) |
118 |
> |
$(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(RLIB) $(LIBS) |
119 |
|
|
120 |
< |
$(DESTDIR)/rview: $(RVOBJS) |
121 |
< |
cc $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS) |
120 |
> |
$(DESTDIR)/rvu: $(RVOBJS) $(RLIB) |
121 |
> |
$(CC) $(CFLAGS) -o $(DESTDIR)/rvu $(RVOBJS) $(RLIB) $(LIBS) $(DLIBS) |
122 |
|
|
123 |
< |
$(DESTDIR)/lookamb: lookamb.o |
124 |
< |
cc $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o |
123 |
> |
$(DESTDIR)/lookamb: lookamb.o ambio.o |
124 |
> |
$(CC) $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o ambio.o $(LIBS) |
125 |
|
|
126 |
< |
$(DEVDIR)/sun.dev: sundev.o |
127 |
< |
cc $(CFLAGS) -o $(DEVDIR)/sun.dev sundev.o \ |
128 |
< |
-lsuntool -lsunwindow -lpixrect $(LIBS) |
126 |
> |
$(RLIB): $(ROBJS) Version.o |
127 |
> |
ar rc $(RLIB) $(ROBJS) Version.o |
128 |
> |
-ranlib $(RLIB) |
129 |
|
|
130 |
< |
$(DEVDIR)/sun.com: suncom.o editline.o |
131 |
< |
cc $(CFLAGS) -o $(DEVDIR)/sun.com suncom.o editline.o |
130 |
> |
$(RCLIB): $(RLOBJS) |
131 |
> |
ar rc $(RCLIB) $(RLOBJS) |
132 |
> |
-ranlib $(RCLIB) |
133 |
|
|
134 |
|
# |
135 |
|
# Special compiles: |
136 |
|
# |
137 |
|
|
138 |
< |
rtmain.o: rmain.c |
139 |
< |
cc $(CFLAGS) -DRTRACE -DNICE=4 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c |
106 |
< |
mv rmain.o rtmain.o |
138 |
> |
rtmain.o: rtmain.c |
139 |
> |
$(CC) $(CFLAGS) -DNICE=4 -c rtmain.c |
140 |
|
|
141 |
< |
rpmain.o: rmain.c |
142 |
< |
cc $(CFLAGS) -DRPICT -DNICE=6 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c |
110 |
< |
mv rmain.o rpmain.o |
141 |
> |
rpmain.o: rpmain.c |
142 |
> |
$(CC) $(CFLAGS) -DNICE=6 -c rpmain.c |
143 |
|
|
144 |
< |
rvmain.o: rmain.c |
145 |
< |
cc $(CFLAGS) -DRVIEW -DDEFPATH=\":$(LIBDIR)\" -c rmain.c |
114 |
< |
mv rmain.o rvmain.o |
144 |
> |
rvmain.o: rvmain.c |
145 |
> |
$(CC) $(CFLAGS) -c rvmain.c |
146 |
|
|
147 |
|
# |
148 |
|
# Uncomment the following to model dispersion: |
149 |
|
# |
150 |
< |
#dielectric.o: dielectric.c source.h |
151 |
< |
# cc $(CFLAGS) -DDISPERSE -c dielectric.c |
150 |
> |
dielectric.o: dielectric.c source.h |
151 |
> |
$(CC) $(CFLAGS) -DDISPERSE -c dielectric.c |
152 |
> |
|
153 |
> |
# end of dispersion compiles. |
154 |
> |
|
155 |
> |
devcomm.o: devcomm.c |
156 |
> |
$(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c |
157 |
> |
|
158 |
|
# |
159 |
< |
#color.o: color.c color.h |
123 |
< |
# cc $(CFLAGS) -DSPEC_RGB -c color.c |
159 |
> |
# Version module: |
160 |
|
# |
125 |
– |
# end of dispersion compiles. |
161 |
|
|
162 |
< |
sundev.o: sundev.c |
163 |
< |
cc $(CFLAGS) -DTTYPROG=\"$(DEVDIR)/sun.com\" -c sundev.c |
162 |
> |
Version.c: VERSION $(RSRC) $(HEADERS) |
163 |
> |
( cat VERSION ; date ; whoami ; hostname ) > Version.c |
164 |
> |
ed - Version.c < verscript.ed |
165 |
|
|
166 |
< |
devcomm.o: devcomm.c |
167 |
< |
cc $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c |
166 |
> |
# |
167 |
> |
# Include dependencies: |
168 |
> |
# |
169 |
|
|
170 |
< |
ambient.o: ambient.c |
171 |
< |
cc $(CFLAGS) -DAMBFLUSH=16 -c ambient.c |
170 |
> |
ambio.o colortab.o data.o devcomm.o \ |
171 |
> |
devmain.o lookamb.o rview.o x11.o: ../common/color.h |
172 |
|
|
173 |
< |
calexpr.o: calexpr.c calcomp.h |
137 |
< |
cc $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c |
173 |
> |
freeobjmem.o o_cone.o srcsupp.o: ../common/cone.h |
174 |
|
|
175 |
< |
caldefn.o: caldefn.c calcomp.h |
176 |
< |
cc $(CFLAGS) -DFUNCTION -c caldefn.c |
175 |
> |
data.o freeobjmem.o m_brdf.o mx_data.o \ |
176 |
> |
p_data.o raycalls.o t_data.o: data.h |
177 |
|
|
178 |
< |
calfunc.o: calfunc.c calcomp.h |
179 |
< |
cc $(CFLAGS) -DVARIABLE -DBIGLIB -c calfunc.c |
178 |
> |
devcomm.o devmain.o devtable.o \ |
179 |
> |
editline.o x11.o: driver.h |
180 |
|
|
181 |
< |
xf.o: xf.c |
146 |
< |
cc $(CFLAGS) -DINVXF -c xf.c |
181 |
> |
freeobjmem.o o_face.o srcsupp.o: ../common/face.h |
182 |
|
|
183 |
< |
# |
184 |
< |
# Include dependencies: |
150 |
< |
# |
183 |
> |
ambient.o raytrace.o rpmain.o rtmain.o \ |
184 |
> |
rtrace.o rvmain.o rv2.o rv3.o: ../common/octree.h |
185 |
|
|
186 |
< |
caldefn.o calexpr.o calfunc.o: calcomp.h |
186 |
> |
o_instance.o: ../common/instance.h |
187 |
|
|
188 |
< |
aed.o color.o data.o devcomm.o lookamb.o rview.o sundev.o x10.o: color.h |
188 |
> |
ambient.o aniso.o dielectric.o freeobjmem.o func.o glass.o initotypes.o \ |
189 |
> |
m_brdf.o m_direct.o m_mirror.o normal.o o_cone.o preload.o \ |
190 |
> |
raycalls.o raytrace.o rtrace.o rv2.o source.o sphere.o srcsupp.o text.o \ |
191 |
> |
srcdraw.o srcobstr.o virtuals.o: ../common/otypes.h |
192 |
|
|
193 |
< |
cone.o o_cone.o source.o: cone.h |
193 |
> |
ambient.o ambcomp.o aniso.o normal.o raycalls.o raytrace.o rpict.o \ |
194 |
> |
rvmain.o rtmain.o rpmain.o persist.o source.o rv3.o \ |
195 |
> |
srcsamp.o virtuals.o: ../common/random.h |
196 |
|
|
197 |
< |
data.o mx_data.o p_data.o t_data.o: data.h |
197 |
> |
ambcomp.o ambient.o aniso.o dielectric.o freeobjmem.o func.o glass.o \ |
198 |
> |
m_brdf.o m_clip.o m_direct.o m_mirror.o m_mist.o mx_data.o o_mesh.o \ |
199 |
> |
mx_func.o normal.o o_cone.o o_face.o o_instance.o p_data.o p_func.o \ |
200 |
> |
raycalls.o raypcalls.o raytrace.o rpict.o rtrace.o rv2.o rv3.o rview.o \ |
201 |
> |
source.o sphere.o srcdraw.o srcobstr.o srcsamp.o srcsupp.o t_data.o t_func.o \ |
202 |
> |
text.o rpmain.o rtmain.o rvmain.o virtuals.o m_alias.o: ray.h \ |
203 |
> |
../common/standard.h ../common/rtmisc.h ../common/rtio.h ../common/rtmath.h \ |
204 |
> |
../common/rterror.h ../common/octree.h ../common/tifftypes.h \ |
205 |
> |
../common/mat4.h ../common/fvect.h ../common/object.h ../common/color.h |
206 |
|
|
207 |
< |
aed.o devcomm.o devtable.o sun.o sundev.o tty.o x10.o: driver.h |
207 |
> |
rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h ../common/resolu.h |
208 |
|
|
209 |
< |
face.o o_face.o source.o: face.h |
209 |
> |
m_direct.o m_mirror.o m_mist.o dielectric.o raycalls.o \ |
210 |
> |
rpict.o rpmain.o rtmain.o rvmain.o rv2.o source.o srcdraw.o \ |
211 |
> |
srcobstr.o srcsamp.o srcsupp.o virtuals.o: source.h |
212 |
|
|
213 |
< |
fvect.o: fvect.h |
213 |
> |
cone.o data.o devcomm.o initotypes.o fprism.o preload.o \ |
214 |
> |
duphead.o octree.o: ../common/standard.h ../common/rtmisc.h \ |
215 |
> |
../common/rtio.h ../common/rtmath.h ../common/tifftypes.h \ |
216 |
> |
../common/rterror.h ../common/mat4.h ../common/fvect.h |
217 |
|
|
218 |
< |
cone.o face.o objset.o otypes.o readobj.o readoct.o: object.h |
218 |
> |
ambio.o: ../common/fvect.h |
219 |
|
|
220 |
< |
ambient.o objset.o octree.o raytrace.o readoct.o rmain.o rv2.o: octree.h |
220 |
> |
initotypes.o srcobstr.o raytrace.o: otspecial.h |
221 |
|
|
222 |
< |
o_instance.o instance.o: instance.h octree.h |
222 |
> |
rpmain.o rtmain.o rvmain.o rpict.o \ |
223 |
> |
srcdraw.o: ../common/view.h ../common/resolu.h |
224 |
|
|
225 |
< |
cone.o dielectric.o func.o normal.o o_cone.o otypes.o \ |
173 |
< |
text.o raytrace.o readobj.o readoct.o rtrace.o \ |
174 |
< |
rv2.o source.o sphere.o: otypes.h |
225 |
> |
x11.o x11twind.o: x11twind.h |
226 |
|
|
227 |
< |
ambient.o rpict.o rv3.o source.o: random.h |
227 |
> |
x11.o: x11icon.h |
228 |
|
|
229 |
< |
ambient.o dielectric.o func.o glass.o image.o m_clip.o \ |
179 |
< |
mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \ |
180 |
< |
p_data.o p_func.o text.o raytrace.o rmain.o rpict.o \ |
181 |
< |
rtrace.o rv2.o rv3.o source.o \ |
182 |
< |
sphere.o t_data.o t_func.o: ray.h standard.h fvect.h object.h color.h |
229 |
> |
ambient.o ambcomp.o ambio.o lookamb.o raycalls.o: ambient.h |
230 |
|
|
231 |
< |
rv2.o rv3.o rview.o: rpaint.h driver.h view.h |
231 |
> |
data.o rpmain.o rtmain.o rvmain.o rpict.o rtrace.o \ |
232 |
> |
rv2.o: ../common/resolu.h |
233 |
|
|
234 |
< |
normal.o source.o: source.h |
234 |
> |
aniso.o func.o m_brdf.o m_direct.o mx_data.o mx_func.o p_data.o \ |
235 |
> |
p_func.o t_data.o t_func.o: func.h ../common/calcomp.h |
236 |
|
|
237 |
< |
cone.o data.o face.o misc.o objset.o octree.o otypes.o \ |
238 |
< |
readobj.o readoct.o rview.o: standard.h fvect.h |
237 |
> |
preload.o: ../common/object.h ../common/face.h ../common/cone.h \ |
238 |
> |
../common/instance.h ../common/mesh.h ../common/color.h data.h |
239 |
|
|
240 |
< |
sundev.o: suntools.icon |
240 |
> |
rtmain.o rpmain.o rvmain.o persist.o duphead.o \ |
241 |
> |
renderopts.o rpict.o: ../common/paths.h |
242 |
|
|
243 |
< |
image.o rmain.o rpict.o: view.h |
243 |
> |
freeobjmem.o raycalls.o text.o: ../common/font.h |
244 |
|
|
245 |
< |
x10.o xtwind.o: xtwind.h |
245 |
> |
raypcalls.o: ../common/selcall.h |
246 |
> |
|
247 |
> |
o_mesh.o: ../common/mesh.h |
248 |
> |
|
249 |
> |
noise3.o: ../common/calcomp.h |
250 |
> |
|
251 |
> |
aniso.o dielectric.o freeobjmem.o glass.o initotypes.o \ |
252 |
> |
m_alias.o m_brdf.o m_clip.o m_direct.o m_mirror.o m_mist.o \ |
253 |
> |
mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \ |
254 |
> |
o_mesh.o p_data.o p_func.o source.o sphere.o t_data.o t_func.o \ |
255 |
> |
text.o: rtotypes.h |