ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/Rmakefile
Revision: 2.9
Committed: Tue Sep 8 09:11:17 1992 UTC (31 years, 7 months ago) by greg
Branch: MAIN
Changes since 2.8: +2 -0 lines
Log Message:
added paths.h file to define DIRSEP and the like

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