[37] | 1 | #! gmake |
---|
| 2 | |
---|
| 3 | # |
---|
| 4 | # Brian Curless |
---|
| 5 | # |
---|
| 6 | # Computer Graphics Laboratory |
---|
| 7 | # Stanford University |
---|
| 8 | # |
---|
| 9 | # --------------------------------------------------------------------- |
---|
| 10 | # |
---|
| 11 | # Copyright (1997) The Board of Trustees of the Leland Stanford Junior |
---|
| 12 | # University. Except for commercial resale, lease, license or other |
---|
| 13 | # commercial transactions, permission is hereby given to use, copy, |
---|
| 14 | # modify this software for academic purposes only. No part of this |
---|
| 15 | # software or any derivatives thereof may be used in the production of |
---|
| 16 | # computer models for resale or for use in a commercial |
---|
| 17 | # product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND |
---|
| 18 | # CONCERNING THIS SOFTWARE. No support is implied or provided. |
---|
| 19 | # |
---|
| 20 | |
---|
| 21 | ifndef OPTIMIZER |
---|
| 22 | OPTIMIZER = -O |
---|
| 23 | endif |
---|
| 24 | |
---|
| 25 | CSRCS = |
---|
| 26 | |
---|
| 27 | CXXSRCS = vripInit.cc vripMain.cc vripMiscCmds.cc OccGrid.cc \ |
---|
| 28 | OccGridRLE.cc plyio.cc DepthMap.cc Mesh.cc softRenderGeom.cc \ |
---|
| 29 | ChunkAllocator.cc ChunkLink.cc DepthMapAux.cc \ |
---|
| 30 | vripFillCmds.cc vripFileCmds.cc vripGridCmds.cc vripRangeCmds.cc \ |
---|
| 31 | vripGUICmds.cc vripGlobals.cc vripAux.cc BBox3f.cc rangePly.cc \ |
---|
| 32 | linePersp.cc perspective.cc scan.cc scanRLE.cc scanLinePerspRLE.cc \ |
---|
| 33 | configure.cc occFunc.cc resample.cc OccGridNormRLE.cc scanNormRLE.cc \ |
---|
| 34 | vripPlyCmds.cc scanPerspRLE.cc |
---|
| 35 | |
---|
| 36 | TARGETS = vrip vriphead |
---|
| 37 | |
---|
| 38 | ROOT = ../.. |
---|
| 39 | |
---|
| 40 | # Get OS uname |
---|
| 41 | UNAME := $(shell uname) |
---|
| 42 | |
---|
| 43 | ifeq ($(UNAME), IRIX) |
---|
| 44 | |
---|
| 45 | # Set optimizer flags to allow it to run on Indys... |
---|
| 46 | ifeq ($(OPTIMIZER), -O) |
---|
| 47 | OPTIMIZER = -O -mips3 |
---|
| 48 | endif #OPTIMIZER |
---|
| 49 | |
---|
| 50 | CC = cc |
---|
| 51 | CXX = CC |
---|
| 52 | |
---|
| 53 | CFLAGS = -woff3262 -woff1174 -woff1356 |
---|
| 54 | CXXFLAGS = -woff3262 -woff1174 -woff1356 |
---|
| 55 | |
---|
| 56 | INCLS = -I. -I$(ROOT)/include -I$(ROOT)/include/tcl8.3 |
---|
| 57 | |
---|
| 58 | LIBPATHS = -L. -L$(ROOT)/lib -L$(ROOT)/lib/irix |
---|
| 59 | |
---|
| 60 | LIBS = -lply -llinear -ltermcap -ltk8.3 -ltcl8.3 \ |
---|
| 61 | -lsl -lX11 -lc -lm |
---|
| 62 | # Lucas: removed -ltclrl -lreadline 2-4-00 |
---|
| 63 | |
---|
| 64 | else |
---|
| 65 | |
---|
| 66 | # Set special optimizer flags... |
---|
| 67 | ifeq ($(OPTIMIZER), -O) |
---|
| 68 | OPTIMIZER = -O6 -march=i686 -malign-double -fno-for-scope \ |
---|
| 69 | -funroll-loops -fomit-frame-pointer -ffast-math |
---|
| 70 | endif |
---|
| 71 | |
---|
| 72 | CC = gcc |
---|
| 73 | CXX = g++ |
---|
| 74 | |
---|
| 75 | CFLAGS = -DLINUX -Wno-unused |
---|
| 76 | CXXFLAGS = -DLINUX -Wno-unused |
---|
| 77 | |
---|
| 78 | INCLS = -I. -I$(ROOT)/include |
---|
| 79 | |
---|
| 80 | LIBPATHS = -L. -L$(ROOT)/lib -L$(ROOT)/lib/linux -L/usr/X11R6/lib |
---|
| 81 | |
---|
| 82 | LIBS = -lply -llinear -ltk -ltcl -ldl \ |
---|
| 83 | -lsl -lXext -lX11 -lc -lm |
---|
| 84 | |
---|
| 85 | endif |
---|
| 86 | |
---|
| 87 | SRCS = $(CXXSRCS) $(CSRCS) |
---|
| 88 | |
---|
| 89 | OBJS = $(CXXSRCS:.cc=.o) $(CSRCS:.c=.o) |
---|
| 90 | |
---|
| 91 | CFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CFLAGS) |
---|
| 92 | CXXFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CXXFLAGS) |
---|
| 93 | CC := $(CC) $(OPTIMIZER) |
---|
| 94 | CXX := $(CXX) $(OPTIMIZER) |
---|
| 95 | |
---|
| 96 | default: all |
---|
| 97 | |
---|
| 98 | all: $(TARGETS) |
---|
| 99 | |
---|
| 100 | install: clobber depend all |
---|
| 101 | |
---|
| 102 | vrip: $(OBJS) |
---|
| 103 | $(CXX) -o $@ $(OBJS) $(LIBPATHS) $(LIBS) |
---|
| 104 | |
---|
| 105 | vriphead: vriphead.o |
---|
| 106 | $(CXX) -o $@ vriphead.o $(LIBPATHS) $(LIBS) |
---|
| 107 | |
---|
| 108 | cysiltoply: cysiltoply.o strings.o |
---|
| 109 | $(CXX) -o $@ cysiltoply.o strings.o $(LIBPATHS) -limg -limage $(LIBS) |
---|
| 110 | |
---|
| 111 | gltest: gltest.o |
---|
| 112 | $(CXX) -o $@ gltest.o -lgl |
---|
| 113 | |
---|
| 114 | gltest2: gltest2.o |
---|
| 115 | $(CXX) -o $@ gltest2.o -lgl |
---|
| 116 | |
---|
| 117 | clean: |
---|
| 118 | -/bin/rm -f *.o *~ core |
---|
| 119 | |
---|
| 120 | clobber: |
---|
| 121 | -/bin/rm -f *.o *~ core makedep $(TARGETS) |
---|
| 122 | |
---|
| 123 | depend: |
---|
| 124 | echo > makedep |
---|
| 125 | gccmakedep -fmakedep -- $(CFLAGS) -- $(SRCS) |
---|
| 126 | -/bin/rm makedep.bak |
---|
| 127 | |
---|
| 128 | -include makedep |
---|
| 129 | |
---|
| 130 | # DO NOT DELETE |
---|