-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·280 lines (203 loc) · 9.74 KB
/
Makefile
File metadata and controls
executable file
·280 lines (203 loc) · 9.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# This file was automatically generated by makemake.
# Do not edit it directly!
# Any changes you make will be silently overwritten.
#######################################################################
# Beginnig of my modifications to build both Debug and Release versions
#
# Copyright (C) 2009 ViGIR Lab (http://vigir.missouri.edu)
# Written by Guilherme N. DeSouza <desouzag@missouri.edu>
#
#
# Remember to change all ¨CPPFLAGS =¨ to ¨CPPFLAGS +=¨
# to change "LINKER = gcc" to "LINKER = g++"
# to remove ¨-g¨ from ¨DEPENDFLAGS¨
# to add ¨${BIN_DIR}/¨ to all ¨%.o¨ rules below
# and to add ¨$(MKFILES)¨ to the list of dependencies in all ¨${BIN_DIR}/%.o¨
# Also remember to change:
# Project configuration: Target = ${BIN_DIR}/<prog_name>
# Make settings: makemake --bin_dir BIN_DIR
# make -k rel_deb=3
# Run settings: Run Program = Release/<prog_name>
# Debug file = ddd Debug/<prog_name>
#
# 18-Jul-2007 Guilherme N. DeSouza
#
# "setenv DEBUG <0,1,2>; make -e" activates the make with the
# proper debug option
#
SUBDIRS = ""
MAKE = make
MKFILES = Makefile
PROG_NAME = register_rdata
CURRDIR = .
OBJS =
ARCH = I686
# Build the requested version of the program.
ifeq (${rel_deb},3)
BIN_DIR := ./Release
CPPFLAGS += -O3 -DDEBUG=0
CPPFLAGS += -D$(ARCH) -DGL_GLEXT_PROTOTYPES -DGLX_GLXEXT_PROTOTYPES
LDFLAGS += -O3
OBJS += -lm -lpthread -L/usr/X11/lib -L/usr/X11R6/lib -lXext -lX11
OBJS += -lXmu -lXi -lglut -lGLU -lGL -lGLEW -lCg -lCgGL
OBJS += -ltiff
OBJS += -llapack -lblas
#OBJS += -ldc1394_control -lraw1394 -L../../camwire-0.8.1/src -lcamwire_1394
#OBJS += /usr/local/lib/tmglib_i686.a /usr/local/lib/liblapack.a /usr/local/lib/libblas.a
#OBJS += /usr/local/lib/libF77.a /usr/local/lib/libI77.a
TEMP := ${shell rm -rf *~}
TEMP := ${shell test -d ${BIN_DIR} || mkdir ${BIN_DIR}}
default:
make -k rel_deb=0
make -k rel_deb=1
else
ifeq (${rel_deb},1)
BIN_DIR := ./Debug
CPPFLAGS += -O0 -DDEBUG=2 -ggdb -g3
CPPFLAGS += -D$(ARCH) -DGL_GLEXT_PROTOTYPES -DGLX_GLXEXT_PROTOTYPES
LDFLAGS += -O0 -ggdb -g3
OBJS += -lm -lpthread -L/usr/X11/lib -L/usr/X11R6/lib -lXext -lX11
OBJS += -lXmu -lXi -lglut -lGLU -lGL -lGLEW -lCg -lCgGL
OBJS += -ltiff
OBJS += -llapack -lblas
#OBJS += -ldc1394_control -lraw1394 -L../../camwire-0.8.1/src -lcamwire_1394
#OBJS += /usr/local/lib/tmglib_i686.a /usr/local/lib/liblapack.a /usr/local/lib/libblas.a
#OBJS += /usr/local/lib/libF77.a /usr/local/lib/libI77.a
TEMP := ${shell rm -rf *~}
TEMP := ${shell test -d ${BIN_DIR} || mkdir ${BIN_DIR}}
else
BIN_DIR := ./Release
CPPFLAGS += -O3 -DDEBUG=0
CPPFLAGS += -D$(ARCH) -DGL_GLEXT_PROTOTYPES -DGLX_GLXEXT_PROTOTYPES
LDFLAGS += -O3
OBJS += -lm -lpthread -L/usr/X11/lib -L/usr/X11R6/lib -lXext -lX11
OBJS += -lXmu -lXi -lglut -lGLU -lGL -lGLEW -lCg -lCgGL
OBJS += -ltiff
OBJS += -llapack -lblas
#OBJS += -ldc1394_control -lraw1394 -L../../camwire-0.8.1/src -lcamwire_1394
#OBJS += /usr/local/lib/tmglib_i686.a /usr/local/lib/liblapack.a /usr/local/lib/libblas.a
#OBJS += /usr/local/lib/libF77.a /usr/local/lib/libI77.a
TEMP := ${shell rm -rf *~}
TEMP := ${shell test -d ${BIN_DIR} || mkdir ${BIN_DIR}}
endif
default:
make -k ${BIN_DIR}/${PROG_NAME}
endif
tidy::
@${RM} -rf ./Debug
@${RM} -rf ./Release
@${RM} -f *~
if [ "$(SUBDIRS)" != "" ]; then set -e;for i in $(SUBDIRS);do $(MAKE) -C $$i clean;done; fi
do_subdirs:default
if [ "$(SUBDIRS)" != "" ]; then set -ae;export DEBUG=$(DEBUG);for i in $(SUBDIRS);do $(MAKE) -e -C $$i; done; fi;
# End of my modifications - Beginning of original file
###################################################################
# Edit this file to define constants and custom build targets.
# Please refer to the makemake documentation for more information.
#
# To compile multiple versions of a program or library, please study
# http://www.its.caltech.edu/~jafl/jcc/multi_version.html
# Useful directories
MYCODEDIR := .
MYHEADERSDIR := ./headers
# Directories to search for header files
SEARCHDIRS := -I/usr/include/GL -iquote -I${MYCODEDIR} -I${MYHEADERSDIR}
# makemake variables
DEPENDFLAGS := ${SEARCHDIRS}
# C preprocessor (C, C++, FORTRAN)
CPPFLAGS +=
# C compiler
CC := gcc
CFLAGS = ${DEPENDFLAGS}
${BIN_DIR}/%.o : %.c $(MKFILES)
${CC} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
${BIN_DIR}/%.o : ../%.c $(MKFILES)
${CC} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
${BIN_DIR}/%.o : othersrc/*/%.c $(MKFILES)
${CC} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
# C++ compiler
CXX := g++
CXXFLAGS = ${DEPENDFLAGS}
${BIN_DIR}/%.o : %.cc $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : %.C $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : %.cpp $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : %.cxx $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : ../%.cc $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : ../%.C $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : ../%.cpp $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : ../%.cxx $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : othersrc/*/%.cc $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : othersrc/*/%.C $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : othersrc/*/%.cpp $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
${BIN_DIR}/%.o : othersrc/*/%.cxx $(MKFILES)
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c $< -o $@
# FORTRAN compiler
FC := f77
FFLAGS =
# C/C++/Eiffel/FORTRAN linker
LINKER := g++
LDFLAGS +=
LOADLIBES := -lm $(OBJS)
# Java compiler
JAVAC := javac
JFLAGS =
JAR := jar
%.class : %.java $(MKFILES)
${JAVAC} ${JFLAGS} $<
# This is what makemake added
# ${BIN_DIR}/register_rdata
${BIN_DIR}/register_rdata : ${BIN_DIR}/ICP.o ${BIN_DIR}/matrix.o ${BIN_DIR}/message.o ${BIN_DIR}/pick_corres_pt.o ${BIN_DIR}/point3D.o ${BIN_DIR}/rdata_vis.o ${BIN_DIR}/register_rdata_main.o ${BIN_DIR}/registration.o ${BIN_DIR}/time_keeper.o ${BIN_DIR}/trackball.o
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}
# target for making everything
.PHONY : all
all: ${BIN_DIR}/register_rdata
# target for removing all object files
.PHONY : tidy
tidy::
@${RM} core ./othersrc/ICP/ICP.o ./othersrc/3D/matrix.o ./othersrc/visualization/message.o ./pick_corres_pt.o ./othersrc/3D/point3D.o ./othersrc/rdata/rdata_vis.o ./register_rdata_main.o ./registration.o ./othersrc/util/time_keeper.o ./othersrc/visualization/trackball.o
# target for removing all object files
.PHONY : clean
clean:: tidy
@${RM} ${BIN_DIR}/register_rdata
# list of all source files
MM_ALL_SOURCES := ./othersrc/ICP/ICP.c ./othersrc/3D/matrix.c ./othersrc/visualization/message.c ./pick_corres_pt.c ./othersrc/3D/point3D.c ./othersrc/rdata/rdata_vis.c ./register_rdata_main.c ./registration.c ./othersrc/util/time_keeper.c ./othersrc/visualization/trackball.c
# target for checking a source file
CHECKSYNTAXFILE := ${basename ${filter %${CHECKSTRING}, ${MM_ALL_SOURCES}}}
.PHONY : checksyntax
checksyntax:
ifneq (${CHECKSYNTAXFILE},)
@${MAKE} ${addsuffix .o, ${CHECKSYNTAXFILE}}
else
@echo No target to make ${CHECKSTRING}
endif
# target for touching appropriate source files
.PHONY : touch
touch::
@list=$$(grep -l ${TOUCHSTRING} ${MM_ALL_SOURCES}); \
for file in $$list; do { echo $$file; touch $$file; } done
# target for calculating dependencies (MAKEMAKE)
.PHONY : jdepend
jdepend:
@${MAKEMAKE} --depend --bin_dir BIN_DIR Makefile -- ${DEPENDFLAGS} -- ./othersrc/ICP/ICP.c ./othersrc/ICP/ICP.o ./othersrc/3D/matrix.c ./othersrc/3D/matrix.o ./othersrc/visualization/message.c ./othersrc/visualization/message.o ./pick_corres_pt.c ./pick_corres_pt.o ./othersrc/3D/point3D.c ./othersrc/3D/point3D.o ./othersrc/rdata/rdata_vis.c ./othersrc/rdata/rdata_vis.o ./register_rdata_main.c ./register_rdata_main.o ./registration.c ./registration.o ./othersrc/util/time_keeper.c ./othersrc/util/time_keeper.o ./othersrc/visualization/trackball.c ./othersrc/visualization/trackball.o
# DO NOT DELETE THIS LINE -- makemake depends on it.
${BIN_DIR}/ICP.o: ./headers/ICP.h ./headers/matrix.h ./headers/point3D.h ./headers/time_keeper.h /usr/include/math.h /usr/include/stdio.h /usr/include/stdlib.h
${BIN_DIR}/matrix.o: ./headers/matrix.h /usr/include/math.h /usr/include/stdio.h /usr/include/stdlib.h
${BIN_DIR}/message.o: ./headers/message.h /usr/include/GL/glut.h /usr/include/stdio.h /usr/include/stdlib.h
${BIN_DIR}/pick_corres_pt.o: ./headers/rdata_vis.h ./pick_corres_pt.h /usr/include/math.h /usr/include/stdio.h /usr/include/stdlib.h /usr/include/string.h
${BIN_DIR}/point3D.o: ./headers/point3D.h /usr/include/math.h /usr/include/stdio.h /usr/include/stdlib.h
${BIN_DIR}/rdata_vis.o: ./headers/rdata_vis.h /usr/include/stdio.h /usr/include/stdlib.h /usr/include/string.h
${BIN_DIR}/register_rdata_main.o: ./headers/ICP.h ./headers/matrix.h ./headers/point3D.h ./headers/rdata_vis.h ./headers/time_keeper.h ./headers/trackball.h ./pick_corres_pt.h ./registration.h /usr/include/GL/glut.h /usr/include/math.h /usr/include/stdio.h /usr/include/stdlib.h /usr/include/string.h
${BIN_DIR}/registration.o: ./headers/ICP.h ./headers/matrix.h ./headers/point3D.h ./headers/rdata_vis.h ./headers/time_keeper.h ./registration.h /usr/include/GL/glut.h /usr/include/math.h /usr/include/stdio.h /usr/include/stdlib.h /usr/include/string.h
${BIN_DIR}/time_keeper.o: ./headers/time_keeper.h /usr/include/stdio.h /usr/include/stdlib.h /usr/include/time.h
${BIN_DIR}/trackball.o: ./headers/trackball.h /usr/include/math.h