| 1 | # | 
| 2 | # SCCSid "$SunId$ LBL" | 
| 3 | # Makefile for conversion programs | 
| 4 | # | 
| 5 |  | 
| 6 | OPT = -O | 
| 7 |  | 
| 8 | MACH = -DBSD | 
| 9 |  | 
| 10 | CFLAGS = $(OPT) $(MACH) -I../common -L../lib | 
| 11 |  | 
| 12 | CC = cc | 
| 13 |  | 
| 14 | MLIB = -lm | 
| 15 |  | 
| 16 | INSTDIR = /usr/local/bin | 
| 17 |  | 
| 18 | LIBDIR = /usr/local/lib/ray | 
| 19 |  | 
| 20 | PROGS = thf2rad ies2rad arch2rad nff2rad lampcolor tmesh2rad obj2rad \ | 
| 21 | mgf2rad rad2mgf | 
| 22 |  | 
| 23 | LIBFILES = source.cal tilt.cal lamp.tab tmesh.cal | 
| 24 |  | 
| 25 | all:    $(PROGS) | 
| 26 |  | 
| 27 | install:        $(PROGS) $(LIBFILES) | 
| 28 | cp $(PROGS) $(INSTDIR) | 
| 29 | cd $(LIBDIR) ; rm -f $(LIBFILES) | 
| 30 | cp $(LIBFILES) $(LIBDIR) | 
| 31 |  | 
| 32 | clean: | 
| 33 | set nonomatch; rm -f $(PROGS) *.o core | 
| 34 | cd mgflib ; make clean | 
| 35 |  | 
| 36 | thf2rad:        thf2rad.o | 
| 37 | $(CC) $(CFLAGS) -o thf2rad thf2rad.o | 
| 38 |  | 
| 39 | ies2rad:        ies2rad.o | 
| 40 | $(CC) $(CFLAGS) -o ies2rad ies2rad.o -lrt | 
| 41 |  | 
| 42 | arch2rad:       arch2rad.o trans.o | 
| 43 | $(CC) $(CFLAGS) -o arch2rad arch2rad.o trans.o -lrt | 
| 44 |  | 
| 45 | nff2rad:        nff2rad.o | 
| 46 | $(CC) $(CFLAGS) -o nff2rad nff2rad.o | 
| 47 |  | 
| 48 | lampcolor:      lampcolor.o | 
| 49 | $(CC) $(CFLAGS) -o lampcolor lampcolor.o -lrt | 
| 50 |  | 
| 51 | tmesh2rad:      tmesh2rad.o tmesh.o | 
| 52 | $(CC) $(CFLAGS) -o tmesh2rad tmesh2rad.o tmesh.o -lrt $(MLIB) | 
| 53 |  | 
| 54 | obj2rad:        obj2rad.o trans.o tmesh.o | 
| 55 | $(CC) $(CFLAGS) -o obj2rad obj2rad.o trans.o tmesh.o -lrt $(MLIB) | 
| 56 |  | 
| 57 | mgf2rad:        MGF_LIB mgf2rad.o tmesh.o | 
| 58 | $(CC) $(CFLAGS) -o mgf2rad mgf2rad.o tmesh.o -lmgf -lrt $(MLIB) | 
| 59 |  | 
| 60 | rad2mgf:        rad2mgf.o | 
| 61 | $(CC) $(CFLAGS) -o rad2mgf rad2mgf.o -lrt $(MLIB) | 
| 62 |  | 
| 63 | MGF_LIB: | 
| 64 | cd mgflib ; \ | 
| 65 | make libmgf.a CFLAGS="$(OPT) $(MACH) '-DMEM_PTR=char *' -DNOPROTO" ; \ | 
| 66 | cp libmgf.a ../../lib | 
| 67 |  | 
| 68 | mgf2rad.o:      mgflib/parser.h tmesh.h | 
| 69 | $(CC) $(CFLAGS) '-DMEM_PTR=char *' -DNOPROTO -c mgf2rad.c | 
| 70 |  | 
| 71 | arch2rad.o trans.o:     trans.h | 
| 72 |  | 
| 73 | ies2rad.o lampcolor.o:  ../common/color.h | 
| 74 |  | 
| 75 | ies2rad.o:      ../common/paths.h | 
| 76 |  | 
| 77 | obj2rad.o tmesh2rad.o:  tmesh.h \ | 
| 78 | ../common/standard.h ../common/mat4.h ../common/fvect.h | 
| 79 |  | 
| 80 | obj2rad.o:      trans.h | 
| 81 |  | 
| 82 | tmesh.o:        tmesh.h ../common/fvect.h | 
| 83 |  | 
| 84 | rad2mgf.o:      ../common/fvect.h ../common/object.h ../common/color.h \ | 
| 85 | ../common/lookup.h |