[37] | 1 | #!/usr/sbin/make |
---|
| 2 | |
---|
| 3 | # |
---|
| 4 | # Homan Igehy |
---|
| 5 | # |
---|
| 6 | # Modified by: Brian Curless |
---|
| 7 | # |
---|
| 8 | # Computer Graphics Laboratory |
---|
| 9 | # Stanford University |
---|
| 10 | # |
---|
| 11 | # --------------------------------------------------------------------- |
---|
| 12 | # |
---|
| 13 | # Copyright (1997-2001) The Board of Trustees of the Leland Stanford |
---|
| 14 | # Junior University. Except for commercial resale, lease, license or |
---|
| 15 | # other commercial transactions, permission is hereby given to use, |
---|
| 16 | # copy, modify this software for academic purposes only. No part of |
---|
| 17 | # this software or any derivatives thereof may be used in the |
---|
| 18 | # production of computer models for resale or for use in a commercial |
---|
| 19 | # product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY |
---|
| 20 | # KIND CONCERNING THIS SOFTWARE. No support is implied or provided. |
---|
| 21 | # |
---|
| 22 | |
---|
| 23 | ROOT = ../.. |
---|
| 24 | |
---|
| 25 | -include ../compile-flags |
---|
| 26 | |
---|
| 27 | CPP = g++ |
---|
| 28 | CPP := $(CPP) $(OPTIMIZER) |
---|
| 29 | |
---|
| 30 | SHELL = /bin/sh |
---|
| 31 | AS = as |
---|
| 32 | AR = ar |
---|
| 33 | AWK = awk |
---|
| 34 | TR2CL = trunc_to_ceil.awk |
---|
| 35 | |
---|
| 36 | HACK = -DInterpolate_$$Interp -DConstant_$$Const \ |
---|
| 37 | -DSampleCalc_$$Calc -DFrameBuffer_$$Frame \ |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | TRI_OBJS = \ |
---|
| 41 | sl_triangle_ZI_None_Dda_Intensity.o |
---|
| 42 | |
---|
| 43 | TRI_FILES = makefile sl_triangle.C sl_common.H sl_common.I sl_hack.H \ |
---|
| 44 | sl_vertex.H sl_val.H sl_framebuffer.H sl_framebuffer.I \ |
---|
| 45 | sl_texture.H sl_texture.I |
---|
| 46 | |
---|
| 47 | SL_OBJS = $(TRI_OBJS) |
---|
| 48 | SL_LIB = libsl.a |
---|
| 49 | |
---|
| 50 | default: $(SL_LIB) |
---|
| 51 | |
---|
| 52 | all: $(SL_LIB) |
---|
| 53 | |
---|
| 54 | $(SL_LIB): makefile $(SL_OBJS) |
---|
| 55 | $(AR) ru $@ $(SL_OBJS) |
---|
| 56 | |
---|
| 57 | $(TRI_OBJS): $(TRI_FILES) |
---|
| 58 | Interp=`echo $@|$(AWK) -F_ '{print $$3}'`;\ |
---|
| 59 | Const=`echo $@|$(AWK) -F_ '{print $$4}'`;\ |
---|
| 60 | Calc=`echo $@|$(AWK) -F_ '{print $$5}'`;\ |
---|
| 61 | Frame=`echo $@|$(AWK) -F_ '{print $$6}'|$(AWK) -F. '{print $$1}'`;\ |
---|
| 62 | File=`echo $@ | $(AWK) -F_ '{print $$1"_"$$2}'`;\ |
---|
| 63 | $(CPP) $(HACK) $(CCFLAGS) -c $$File.C -o $@ |
---|
| 64 | |
---|