| 1 |
+ |
# RCSid $Id$ |
| 2 |
|
# |
| 2 |
– |
# SCCSid "$SunId$ LBL" |
| 3 |
|
# Makefile for conversion programs |
| 4 |
|
# |
| 5 |
|
|
| 7 |
|
|
| 8 |
|
MACH = -DBSD |
| 9 |
|
|
| 10 |
< |
CFLAGS = $(OPT) $(MACH) -I../common -L../lib |
| 10 |
> |
CFLAGS = -I../common -L../lib $(OPT) $(MACH) |
| 11 |
> |
METACFLAGS = -I../meta |
| 12 |
|
|
| 13 |
|
CC = cc |
| 14 |
|
|
| 18 |
|
|
| 19 |
|
LIBDIR = /usr/local/lib/ray |
| 20 |
|
|
| 21 |
+ |
MGF_LIB = ../lib/libmgf.a |
| 22 |
+ |
|
| 23 |
|
PROGS = thf2rad ies2rad arch2rad nff2rad lampcolor tmesh2rad obj2rad \ |
| 24 |
< |
mgf2rad rad2mgf mgf2meta |
| 24 |
> |
mgf2rad rad2mgf mgf2meta mgfilt mgf2inv |
| 25 |
|
|
| 26 |
< |
LIBFILES = source.cal tilt.cal lamp.tab tmesh.cal |
| 26 |
> |
LIBFILES = source.cal tilt.cal lamp.tab |
| 27 |
|
|
| 28 |
|
all: $(PROGS) |
| 29 |
|
|
| 30 |
|
install: $(PROGS) $(LIBFILES) |
| 31 |
|
cp $(PROGS) $(INSTDIR) |
| 32 |
< |
cd $(LIBDIR) ; rm -f $(LIBFILES) |
| 32 |
> |
cd $(LIBDIR) && rm -f $(LIBFILES) |
| 33 |
|
cp $(LIBFILES) $(LIBDIR) |
| 34 |
|
|
| 35 |
|
clean: |
| 51 |
|
lampcolor: lampcolor.o |
| 52 |
|
$(CC) $(CFLAGS) -o lampcolor lampcolor.o -lrt |
| 53 |
|
|
| 54 |
< |
tmesh2rad: tmesh2rad.o tmesh.o |
| 55 |
< |
$(CC) $(CFLAGS) -o tmesh2rad tmesh2rad.o tmesh.o -lrt $(MLIB) |
| 54 |
> |
tmesh2rad: tmesh2rad.o |
| 55 |
> |
$(CC) $(CFLAGS) -o tmesh2rad tmesh2rad.o -lrt $(MLIB) |
| 56 |
|
|
| 57 |
< |
obj2rad: obj2rad.o trans.o tmesh.o |
| 58 |
< |
$(CC) $(CFLAGS) -o obj2rad obj2rad.o trans.o tmesh.o -lrt $(MLIB) |
| 57 |
> |
obj2rad: obj2rad.o trans.o |
| 58 |
> |
$(CC) $(CFLAGS) -o obj2rad obj2rad.o trans.o -lrt $(MLIB) |
| 59 |
|
|
| 60 |
< |
mgf2rad: MGF_LIB mgf2rad.o tmesh.o |
| 61 |
< |
$(CC) $(CFLAGS) -o mgf2rad mgf2rad.o tmesh.o -lmgf -lrt $(MLIB) |
| 60 |
> |
mgf2rad: $(MGF_LIB) mgf2rad.o |
| 61 |
> |
$(CC) $(CFLAGS) -o mgf2rad mgf2rad.o -lmgf -lrt $(MLIB) |
| 62 |
|
|
| 63 |
|
rad2mgf: rad2mgf.o |
| 64 |
|
$(CC) $(CFLAGS) -o rad2mgf rad2mgf.o -lrt $(MLIB) |
| 65 |
|
|
| 66 |
< |
mgf2meta: MGF_LIB mgf2meta.o |
| 66 |
> |
mgf2meta: $(MGF_LIB) mgf2meta.o |
| 67 |
|
$(CC) $(CFLAGS) -o mgf2meta mgf2meta.o -lmgf -lmeta -lrt $(MLIB) |
| 68 |
|
|
| 69 |
< |
MGF_LIB: |
| 69 |
> |
mgfilt: |
| 70 |
> |
cd mgflib ; rm -f mgfilt ; \ |
| 71 |
> |
make mgfilt CC=$(CC) \ |
| 72 |
> |
CFLAGS="$(OPT) $(MACH)" ; \ |
| 73 |
> |
mv mgfilt .. |
| 74 |
> |
|
| 75 |
> |
mgf2inv: |
| 76 |
> |
cd mgflib ; rm -f mgf2inv ; \ |
| 77 |
> |
make mgf2inv CC=$(CC) \ |
| 78 |
> |
CFLAGS="$(OPT) $(MACH)" ; \ |
| 79 |
> |
mv mgf2inv .. |
| 80 |
> |
|
| 81 |
> |
$(MGF_LIB): |
| 82 |
|
cd mgflib ; rm -f libmgf.a ; \ |
| 83 |
|
make libmgf.a CC=$(CC) \ |
| 84 |
< |
CFLAGS="$(OPT) $(MACH) '-DMEM_PTR=char *' -DNOPROTO" ; \ |
| 85 |
< |
cp libmgf.a ../../lib |
| 84 |
> |
CFLAGS="$(OPT) $(MACH)" ; \ |
| 85 |
> |
mv libmgf.a ../../lib |
| 86 |
|
|
| 87 |
< |
mgf2rad.o: mgflib/parser.h tmesh.h ../common/color.h |
| 88 |
< |
$(CC) $(CFLAGS) '-DMEM_PTR=char *' -DNOPROTO -c mgf2rad.c |
| 87 |
> |
mgf2rad.o: mgf2rad.c mgflib/parser.h ../common/tmesh.h ../common/color.h |
| 88 |
> |
$(CC) $(CFLAGS) -c mgf2rad.c |
| 89 |
|
|
| 90 |
< |
mgf2meta.o: mgflib/parser.h |
| 91 |
< |
$(CC) $(CFLAGS) '-DMEM_PTR=char *' -DNOPROTO -c mgf2meta.c |
| 90 |
> |
mgf2meta.o: mgf2meta.c mgflib/parser.h |
| 91 |
> |
$(CC) $(CFLAGS) $(METACFLAGS) -c mgf2meta.c |
| 92 |
|
|
| 93 |
|
arch2rad.o trans.o: trans.h |
| 94 |
|
|
| 96 |
|
|
| 97 |
|
ies2rad.o: ../common/paths.h |
| 98 |
|
|
| 99 |
< |
obj2rad.o tmesh2rad.o: tmesh.h \ |
| 100 |
< |
../common/standard.h ../common/mat4.h ../common/fvect.h |
| 99 |
> |
obj2rad.o tmesh2rad.o: ../common/tmesh.h \ |
| 100 |
> |
../common/standard.h ../common/rtmisc.h ../common/rtio.h \ |
| 101 |
> |
../common/rtmath.h ../common/rterror.h ../common/mat4.h \ |
| 102 |
> |
../common/fvect.h ../common/tifftypes.h |
| 103 |
|
|
| 104 |
|
obj2rad.o: trans.h |
| 105 |
|
|
| 106 |
< |
tmesh.o: tmesh.h ../common/fvect.h |
| 107 |
< |
|
| 91 |
< |
rad2mgf.o: ../common/fvect.h ../common/object.h ../common/color.h \ |
| 92 |
< |
../common/lookup.h |
| 106 |
> |
rad2mgf.o: ../common/standard.h ../common/mat4.h ../common/fvect.h \ |
| 107 |
> |
../common/object.h ../common/color.h ../common/lookup.h |