1 | # |
---|
2 | # Brian Curless |
---|
3 | # |
---|
4 | # Computer Graphics Laboratory |
---|
5 | # Stanford University |
---|
6 | # |
---|
7 | # --------------------------------------------------------------------- |
---|
8 | # |
---|
9 | # Copyright (1997) The Board of Trustees of the Leland Stanford Junior |
---|
10 | # University. Except for commercial resale, lease, license or other |
---|
11 | # commercial transactions, permission is hereby given to use, copy, |
---|
12 | # modify this software for academic purposes only. No part of this |
---|
13 | # software or any derivatives thereof may be used in the production of |
---|
14 | # computer models for resale or for use in a commercial |
---|
15 | # product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND |
---|
16 | # CONCERNING THIS SOFTWARE. No support is implied or provided. |
---|
17 | # |
---|
18 | |
---|
19 | # PLY polygon file routines |
---|
20 | |
---|
21 | |
---|
22 | ifndef OPTIMIZER |
---|
23 | OPTIMIZER = -O |
---|
24 | endif |
---|
25 | |
---|
26 | |
---|
27 | # Get OS uname |
---|
28 | UNAME := $(shell uname) |
---|
29 | |
---|
30 | ifeq ($(UNAME), IRIX) |
---|
31 | |
---|
32 | # Set optimizer flags to allow it to run on Indys... |
---|
33 | |
---|
34 | ifeq ($(OPTIMIZER), -O) |
---|
35 | OPTIMIZER = -O -mips3 |
---|
36 | endif #OPTIMIZER |
---|
37 | |
---|
38 | CC = cc |
---|
39 | CXX = CC |
---|
40 | |
---|
41 | CFLAGS = -woff3262 -woff1174 |
---|
42 | CXXFLAGS = -woff3262 -woff1174 |
---|
43 | |
---|
44 | INCLS = -I. |
---|
45 | |
---|
46 | LIBPATHS = -L. |
---|
47 | |
---|
48 | else |
---|
49 | |
---|
50 | # Set special optimizer flags... |
---|
51 | ifeq ($(OPTIMIZER),-O) |
---|
52 | OPTIMIZER = -O6 -march=i686 -malign-double \ |
---|
53 | -funroll-loops -fomit-frame-pointer -ffast-math |
---|
54 | endif |
---|
55 | |
---|
56 | CC = gcc |
---|
57 | CXX = g++ |
---|
58 | |
---|
59 | CFLAGS = -DLINUX -Wno-unused |
---|
60 | CXXFLAGS = -DLINUX -Wno-unused |
---|
61 | |
---|
62 | INCLS = -I. |
---|
63 | |
---|
64 | LIBPATHS = -L. |
---|
65 | |
---|
66 | endif |
---|
67 | |
---|
68 | CFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CFLAGS) |
---|
69 | CC := $(CC) $(OPTIMIZER) |
---|
70 | CXX := $(CXX) $(OPTIMIZER) |
---|
71 | default: all |
---|
72 | |
---|
73 | all: $(TARGETS) |
---|
74 | |
---|
75 | install: clobber depend all |
---|
76 | |
---|
77 | clean: |
---|
78 | -/bin/rm -f *~ *.o core |
---|
79 | |
---|
80 | clobber: |
---|
81 | -/bin/rm -f *~ *.o core makedep $(TARGETS) |
---|
82 | |
---|
83 | depend: |
---|
84 | echo > makedep |
---|
85 | gccmakedep -fmakedep -- $(CFLAGS) -- $(CSRCS) |
---|
86 | rm makedep.bak |
---|
87 | |
---|
88 | -include makedep |
---|