[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 | # Get OS uname |
---|
| 26 | UNAME := $(shell uname) |
---|
| 27 | |
---|
| 28 | ifeq ($(UNAME), IRIX) |
---|
| 29 | |
---|
| 30 | # Set optimizer flags to allow it to run on Indys... |
---|
| 31 | ifeq ($(OPTIMIZER), -O) |
---|
| 32 | OPTIMIZER = -O -mips3 |
---|
| 33 | endif #OPTIMIZER |
---|
| 34 | |
---|
| 35 | CC = cc |
---|
| 36 | CXX = CC |
---|
| 37 | |
---|
| 38 | CFLAGS = -woff3262 -woff1174 -woff1356 |
---|
| 39 | CXXFLAGS = -woff3262 -woff1174 -woff1356 |
---|
| 40 | |
---|
| 41 | INCLS = -I. -I$(ROOT)/include |
---|
| 42 | |
---|
| 43 | LIBPATHS = -L. -L$(ROOT)/lib |
---|
| 44 | |
---|
| 45 | else |
---|
| 46 | |
---|
| 47 | # Set special optimizer flags... |
---|
| 48 | ifeq ($(OPTIMIZER), -O) |
---|
| 49 | OPTIMIZER = -O6 -march=i686 -malign-double -fno-for-scope \ |
---|
| 50 | -funroll-loops -fomit-frame-pointer -ffast-math |
---|
| 51 | endif |
---|
| 52 | |
---|
| 53 | CC = gcc |
---|
| 54 | CXX = g++ |
---|
| 55 | |
---|
| 56 | CFLAGS = -DLINUX -Wno-unused |
---|
| 57 | CXXFLAGS = -DLINUX -Wno-unused |
---|
| 58 | |
---|
| 59 | INCLS = -I. -I$(ROOT)/include |
---|
| 60 | |
---|
| 61 | LIBPATHS = -L. -L$(ROOT)/lib |
---|
| 62 | |
---|
| 63 | endif |
---|
| 64 | |
---|
| 65 | SRCS = $(CXXSRCS) $(CSRCS) |
---|
| 66 | |
---|
| 67 | OBJS = $(CXXSRCS:.cc=.o) $(CSRCS:.c=.o) |
---|
| 68 | |
---|
| 69 | CFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CFLAGS) |
---|
| 70 | CXXFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CXXFLAGS) |
---|
| 71 | CC := $(CC) $(OPTIMIZER) |
---|
| 72 | CXX := $(CXX) $(OPTIMIZER) |
---|
| 73 | |
---|
| 74 | default: all |
---|
| 75 | |
---|
| 76 | all: $(TARGETS) |
---|
| 77 | |
---|
| 78 | install: clobber depend all |
---|
| 79 | |
---|
| 80 | clean: |
---|
| 81 | -/bin/rm -f *.o *~ core |
---|
| 82 | |
---|
| 83 | clobber: |
---|
| 84 | -/bin/rm -f *.o *~ core makedep $(TARGETS) |
---|
| 85 | |
---|
| 86 | depend: |
---|
| 87 | echo > makedep |
---|
| 88 | gccmakedep -fmakedep -- $(CFLAGS) -- $(SRCS) |
---|
| 89 | -/bin/rm makedep.bak |
---|
| 90 | |
---|
| 91 | -include makedep |
---|
| 92 | |
---|
| 93 | # DO NOT DELETE |
---|
| 94 | |
---|