Debian Codegraph @

doris_core/Makefile

raw
1 #########################################################################
2 # Makefile for the Doris software. #
3 # Created by: configure #
4 # 04-Dec-1998 #
5 # #
6 # Delft University of Technology #
7 # Delft Institute of Earth Observation and Space Systems #
8 # http://doris.tudelft.nl #
9 # See also the user manual, annex installation. #
10 # #
11 ### Usage ### #
12 # The command: "make" creates and optimized version of doris. #
13 # The command: "make install" installs it andcleans up. #
14 # If this does not work, try a more controlled approach by: #
15 # #
16 # 0. inspect set up of this Makefile #
17 # 1. set CC DEFS LIBS etc., first set these to debug values #
18 # (read NOTE there if problems) #
19 # 2. compile software sources to *.o: "make swobjs" #
20 # 3. link object together to executable: "make doris" #
21 # 4. install executable: "make install" #
22 # 5. remove object files: "make clean" #
23 # #
24 # BTW. "make" does "swobjs doris" by default. #
25 # #
26 ### #
27 # Successfully tested for compilers/platforms: #
28 # GNU g++ version 2.7.2.2 on HP-UX B.10.20 A 9000/785 #
29 # GNU g++ version 2.95.2 on HP-UX B.10.20 A 9000/785 #
30 # HP aCC version A.01.07 on HP-UX B.10.20 A 9000/785 #
31 # GNU g++ version ? on Linux X86 #
32 # SGI ? #
33 # Sun Studion 9,10,11 on Solaris Sparc and X86/AMD64 #
34 # GNU g++ versions v3.4, v4.0, v4.1, v4.2, v4.3 on Linux X86 and AMD64 #
35 # Sun Sudion v11 on Linux AMD64 #
36 # Intel Compilers v9, v10, v11 on Linux AMD64 #
37 #########################################################################
38 ###################################################################
39 ###################################################################
40 # Please change if required: DEF[1-6], CC, CFLAGS, LIBDIR, ###
41 ###################################################################
42 ### The shell used by this makefile ###
43 SHELL = /bin/sh
44
45 ### Specify compiler/installation directory ###
46 INSTALLDIR = /data/src/Doris_s1_git/bin
47 CC = g++
48 SCRIPTSDIR = ../bin
49
50 ### Define statements controlling compilation ###
51 # Comment out DEF[1-8] statements when appropriate.
52 DEF1 = -D__DEBUGMAT1 # -1- range checking in matrix class
53 DEF2 = -D__DEBUGMAT2 # -2- info matrix class (debug only)
54 DEF3 = -D__DEBUG # -3- debug for other files
55 DEF4 = -Wno-deprecated # -4- do not display warnings due to depricated entries
56 DEF5 = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE # -5- support for large files
57 #DEF6 = -DNO_FASTTRIG # -6- extra functional switches
58 #DEF9 = -D__NO_IOS_BINARY__ # -9- comment out if you ios::binary (most will)
59 #
60 ### Do not change following 2, simply comment DEF1-8 above
61 DEFSDEBUG = $(DEF1) $(DEF2) $(DEF3)
62 DEFS = $(DEF4) $(DEF5) $(DEF6) -D__USE_FFTW_LIBRARY__ -D__X86PROCESSOR__ -I/usr/include
63
64 ### NOTE ###
65 # If you get warnings like the following (I got them with g++, not with aCC)
66 # then use define __GNUC__ to define these functions
67 #%// BK 15-Aug-2000
68 #In file included from matrixbk.h:38,
69 # from processor.cc:23:
70 #constants.h: In method `real8 cn::dist(cn) const':
71 #constants.h:106: implicit declaration of function `int sqr(...)'
72 ### END NOTE ###
73
74
75 # LOCAL dir
76 LOCAL_INSTALLDIR = ../bin
77
78 ### CFLAGS ###
79 # Compiler options flag ###
80 # Specify compiler flags (I selected these for g++)
81 CFLAGSDEBUG = -g -O $(DEFS) $(DEFSDEBUG)
82 CFLAGSOPT = -O $(DEFS)
83 #CFLAGSOPT = -O2 $(DEFS) # this crashed doris! (?)
84 #CFLAGSOPT = -O3 $(DEFS) # this crashed doris! (?)
85
86 ### CCNOTE ###
87 ### Change here ###
88 ### set CFLAGS depending on if you compile debug version or working version ###
89 #CFLAGS = $(CFLAGSDEBUG)
90 CFLAGS = $(CFLAGSOPT)
91 ### END CCNOTE ###
92
93 ### Library locations flag ###
94 ### -lcl : used for veclib
95 ### -lm : used for fftw
96 LFLAGS = -L/lib64 -lfftw3f -lm
97
98
99 #####################################################
100 ### No need to change anything below here... ####
101 #####################################################
102 EXECUTABLE = doris
103
104 SWSRCS = processor.cc \
105 utilities.cc \
106 ioroutines.cc \
107 readinput.cc \
108 readdata.cc \
109 coregistration.cc \
110 filtering.cc \
111 referencephase.cc \
112 products.cc \
113 geocode.cc \
114 unwrap.cc \
115 matrixspecs.cc \
116 exceptions.cc \
117 estorbit.cc
118 SWOBJS = $(SWSRCS:.cc=.o)
119
120 ### scripts of doris.tar in SCRIPTSDIR, used at make install
121 SCRIPTS = helpdoris \
122 baseline.doris.sh \
123 baseline.doris.csh \
124 construct_dem.sh \
125 coregpm.doris \
126 doris* \
127 heightamb \
128 phasefilt.doris \
129 plotcpm* \
130 plotoffsets* \
131 run \
132 viewanddel \
133 cpx2ps \
134 lonlathei2ascii \
135 ascii2ascii_UTM \
136 ascii2ps* \
137 tsx* \
138 rs2* \
139 csk* \
140 gammaReadfiles.csh \
141 hhmmss2sec.py \
142 sec2hhmmss.py
143
144
145
146
147 #####################################################
148 ### And no need to change anything below here... ####
149 #####################################################
150 ### what to do if make w/o arguments ###
151 # first make all object files, then link them together
152 default: $(EXECUTABLE)
153
154
155 ### how to compile object code .o from C++ source files .cc (general rule) ###
156 # space between -o and filename for SUN make (BK 7 july 2000)
157 .cc.o:
158 $(CC) $(CFLAGS) -c -o $(@) $<
159
160 #####################################################
161 ### Make object code from source ###
162 swobjs: $(SWOBJS)
163
164
165 ### Load objects to executable ###
166 ### The added .cc files contain class definitions
167 ### matrixclass is explicitly included
168 ### in the source code since we had some problems finding out how to do that
169 ### here, since compilers treat the template class differently than normal classes.
170 ### BK 07-Feb-2002
171 $(EXECUTABLE): $(SWOBJS) tmp_strptime.cc slcimage.cc productinfo.cc orbitbk.cc
172 $(CC) $(CFLAGS) -c -o triangle.o -DTRILIBRARY -DANSI_DECLARATORS triangle.c
173 $(CC) $(CFLAGS)\
174 tmp_strptime.cc $(SWOBJS) triangle.o\
175 slcimage.cc productinfo.cc orbitbk.cc\
176 $(LFLAGS) -o $@
177 @echo " "
178 @echo "*******************************"
179 @echo "* ...Compilation finished... *"
180 @echo "*******************************"
181 @echo " "
182
183
184 ### Install executable in installdir ###
185 install: $(EXECUTABLE)
186 @echo "* Installing $(EXECUTABLE) in: $(INSTALLDIR)"
187 @cp -f $(EXECUTABLE) $(INSTALLDIR)/.
188 ( cd $(SCRIPTSDIR); cp -f $(SCRIPTS) $(INSTALLDIR)/. )
189 $(MAKE) cleaner
190 @echo " "
191 @echo "*******************************"
192 @echo "* ...Installation finished... *"
193 @echo "*******************************"
194 @echo " "
195 @echo "* Check that $(INSTALLDIR) is in your path search: echo \$$PATH ."
196 @echo " "
197
198
199 installcb: $(EXECUTABLE)
200 @echo "* Installing $(EXECUTABLE) in: $(LOCAL_INSTALLDIR)"
201 @cp -f $(EXECUTABLE) $(LOCAL_INSTALLDIR)/.
202 $(MAKE) cleaner
203 @echo " "
204 @echo "*******************************"
205 @echo "* ...Installation finished... *"
206 @echo "*******************************"
207 @echo " "
208 @echo "* Check that $(LOCAL_INSTALLDIR) is in your path search: echo \$$PATH ."
209 @echo " "
210
211
212 #####################################################
213 ### Testers ###
214 test: testdoris
215 testdoris: $(EXECUTABLE)
216 @echo " "
217 @echo "* Executing command: $(EXECUTABLE) -v"
218 $(EXECUTABLE) -v
219 @echo " "
220
221 ### Orbit test program for debugging ###
222 test-orbit: ioroutines.o matrixspecs.o utilities.o exceptions.cc slcimage.cc orbitbk.cc matrixbk.cc bk_messages.hh
223 $(CC) $(CFLAGS) -D__TESTMAIN__ \
224 ioroutines.o matrixspecs.o utilities.o exceptions.cc slcimage.cc orbitbk.cc \
225 $(LFLAGS) \
226 -o $@
227 ### Matrix test program for debugging ###
228 ### fast_sin defined in utilities.cc, which requires ioroutines, which, etc.
229 test-matrix: matrix_test.cc matrixspecs.o utilities.o utilities.o ioroutines.o matrixbk.cc
230 $(CC) $(CFLAGS) matrix_test.cc matrixspecs.o \
231 utilities.o ioroutines.o exceptions.cc orbitbk.cc \
232 $(LFLAGS) \
233 -o $@
234 @echo " "
235
236
237 #####################################################
238 ### Cleaners ###
239 clean: cleanswobjs
240
241 cleaner: clean cleanprog
242 cleanest: clean cleanprog uninstall
243 cleanprog:
244 @rm -f $(EXECUTABLE) $(EXECUTABLE.debug) \
245 matrixbk_test testorbit
246 @echo "* Removed executables in current dir."
247 cleanswobjs:
248 @rm -f $(SWOBJS) matrixbk_test.o orbitbk.o slcimage.o triangle.o
249 @echo "* Removed object files."
250 uninstall:
251 @rm -f $(INSTALLDIR)/$(EXECUTABLE)
252 @echo "* Removed executables in install dir: $(INSTALLDIR)."
253
254 ### BK 12-Dec-2000 ###
255