source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/vrippack-0.31/src/march/bak/makefile @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 2.7 KB
Line 
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
19ifndef OPTIMIZER
20        OPTIMIZER = -O
21endif
22
23CSRCS = 
24
25CXXSRCS = main.cc getinfo.cc init.cc edge.cc cube.cc quit.cc \
26        fatal.cc slices.cc OccGridRLE.cc SectionRLE.cc \
27        ChunkAllocator.cc ChunkLink.cc OccGrid.cc
28
29TARGETS = vripmarch
30
31ROOT = ../..
32
33# Get OS uname
34UNAME := $(shell uname)
35
36ifeq ($(UNAME), IRIX)
37
38        # Set optimizer flags to allow it to run on Indys...
39        ifeq ($(OPTIMIZER), -O)
40            OPTIMIZER = -O -mips3
41        endif  #OPTIMIZER
42
43        CC = cc
44        CXX = CC
45
46        CFLAGS = -woff3262 -woff1174 -woff1356
47        CXXFLAGS = -woff3262 -woff1174 -woff1356
48
49        INCLS = -I. -I$(ROOT)/include
50
51        LIBPATHS = -L. -L$(ROOT)/lib
52
53        LIBS = -lmcfile -lply -llinear -lm -lmalloc
54
55else
56
57        # Set special optimizer flags...
58        ifeq ($(OPTIMIZER),-O)
59                OPTIMIZER = -O6 -march=i686 -malign-double  \
60                            -funroll-loops -fomit-frame-pointer -ffast-math
61        endif
62
63        CC = gcc
64        CXX = g++
65
66        CFLAGS = -DLINUX -Wall -Wno-unused
67        CXXFLAGS = -DLINUX -Wall -Wno-unused
68
69        INCLS = -I. -I$(ROOT)/include
70
71        LIBPATHS = -L. -L$(ROOT)/lib
72
73        LIBS = -lmcfile -lply -lm -lc
74
75endif
76
77
78CFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CFLAGS)
79CXXFLAGS := $(INCLS) -DFUNCPROTO -DHAVE_UNISTD_H $(CXXFLAGS)
80CC := $(CC) $(OPTIMIZER)
81CXX := $(CXX) $(OPTIMIZER)
82
83SRCS = $(CXXSRCS) $(CSRCS)
84
85OBJS = $(CXXSRCS:.cc=.o) $(CSRCS:.c=.o)
86
87OBJ2 = fromden.o
88OBJ3 = polys.o mcfile.o
89OBJ4 = mctoply.o mcfile.o
90
91default: all
92
93all: $(TARGETS)
94
95install: clobber depend all
96
97vripmarch: $(OBJS) libmcfile.a
98        $(CXX) -o $@ $(OBJS) $(LIBPATHS) $(LIBS)
99
100polys: $(OBJ3)
101        $(CC) $(CFLAGS) $(C++FLAGS) $(OBJ3) -o polys $(LIBPATHS) $(LIBS) 
102
103mctoply: $(OBJ4)
104        $(CC) $(CFLAGS) $(C++FLAGS) $(OBJ4) -o mctoply $(LIBPATHS) $(LIBS) 
105
106fromshd: $(OBJ2)
107        $(CC) $(CFLAGS) -o fromshd $(OBJ2)
108
109fromden: $(OBJ2)
110        $(CC) $(CFLAGS) -o fromden $(OBJ2) $(LIBPATHS) -llevden
111
112libmcfile.a:    libmcfile.a(mcfile.o)
113#       ranlib libmcfile.a
114
115libmcfile.a(mcfile.o):  mcfile.h
116
117clean:
118        -/bin/rm -f *.o *~ core
119
120clobber:
121        -/bin/rm -f *.o *~ core makedep $(TARGETS)
122
123depend:
124        echo > makedep
125        gccmakedep -fmakedep -- $(CFLAGS) -- $(SRCS)
126        rm makedep.bak
127
128-include makedep
Note: See TracBrowser for help on using the repository browser.