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 | ifndef OPTIMIZER |
---|
20 | OPTIMIZER = -O |
---|
21 | endif |
---|
22 | |
---|
23 | CSRCS = \ |
---|
24 | |
---|
25 | CXXSRCS = \ |
---|
26 | plycullmaxx.cc \ |
---|
27 | plymerge.cc |
---|
28 | |
---|
29 | |
---|
30 | TARGETS = \ |
---|
31 | plycullmaxx \ |
---|
32 | plymerge |
---|
33 | |
---|
34 | # Targets to be built on SGI only (need SGI libraries)... |
---|
35 | SGICXXSRCS = matrix2quat.cc |
---|
36 | SGITARGETS = matrix2quat |
---|
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 | CXXSRCS := $(CXXSRCS) $(SGICXXSRCS) |
---|
51 | |
---|
52 | TARGETS := $(TARGETS) $(SGITARGETS) |
---|
53 | |
---|
54 | CC = cc |
---|
55 | CXX = CC |
---|
56 | |
---|
57 | CFLAGS = -woff3262 -woff1174 -woff1356 |
---|
58 | CXXFLAGS = -woff3262 -woff1174 -woff1356 |
---|
59 | |
---|
60 | INCLS = -I. -I$(ROOT)/include |
---|
61 | |
---|
62 | LIBPATHS = -L. -L$(ROOT)/lib |
---|
63 | |
---|
64 | LIBS = -lm -lply |
---|
65 | |
---|
66 | else |
---|
67 | |
---|
68 | # Set special optimizer flags... |
---|
69 | ifeq ($(OPTIMIZER), -O) |
---|
70 | OPTIMIZER = -O6 -march=i686 -malign-double -fno-for-scope \ |
---|
71 | -funroll-loops -fomit-frame-pointer -ffast-math |
---|
72 | endif |
---|
73 | |
---|
74 | CC = gcc |
---|
75 | CXX = g++ |
---|
76 | |
---|
77 | CFLAGS = -DLINUX -Wall -Wno-unused -Wmissing-prototypes \ |
---|
78 | -Wmissing-declarations |
---|
79 | CXXFLAGS = -DLINUX -Wall -Wno-unused |
---|
80 | |
---|
81 | INCLS = -I. -I$(ROOT)/include |
---|
82 | |
---|
83 | LIBPATHS = -L. -L$(ROOT)/lib |
---|
84 | |
---|
85 | LIBS = -lm -lply |
---|
86 | |
---|
87 | endif |
---|
88 | |
---|
89 | |
---|
90 | CFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CFLAGS) |
---|
91 | CXXFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CXXFLAGS) |
---|
92 | CC := $(CC) $(OPTIMIZER) |
---|
93 | CXX := $(CXX) $(OPTIMIZER) |
---|
94 | |
---|
95 | |
---|
96 | |
---|
97 | default: all |
---|
98 | |
---|
99 | all: $(TARGETS) |
---|
100 | |
---|
101 | install: clobber depend all |
---|
102 | |
---|
103 | clobber: |
---|
104 | -/bin/rm -f *.o *~ core makedep $(TARGETS) |
---|
105 | |
---|
106 | matrix2quat: matrix2quat.o |
---|
107 | $(CXX) -o $@ matrix2quat.o $(LIBPATHS) $(LIBS) -lInventor |
---|
108 | |
---|
109 | plycullmaxx: plycullmaxx.o |
---|
110 | $(CXX) -o $@ plycullmaxx.o $(LIBPATHS) $(LIBS) |
---|
111 | |
---|
112 | plymerge: plymerge.o |
---|
113 | $(CXX) -o $@ plymerge.o $(LIBPATHS) $(LIBS) |
---|
114 | |
---|
115 | clean: |
---|
116 | -/bin/rm -f *.o *~ core |
---|
117 | |
---|
118 | depend: |
---|
119 | echo > makedep |
---|
120 | gccmakedep -fmakedep -- $(CFLAGS) -- $(CSRCS) $(CXXSRCS) |
---|
121 | -rm makedep.bak |
---|
122 | |
---|
123 | -include makedep |
---|