Debian Codegraph @

sar_tools/Makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #################################################################
2 # Makefile for HP aCC c++ programs SAR tools #
3 # should work with other compilers as well #
4 # "make [all]" all exe's #
5 # "make prog.o" compile only prog.o #
6 # "make prog" compile only prog #
7 # "make clean" remove junk caused by makes #
8 # "make cleaner" remove all caused by makes #
9 # "make uninstall" remove all caused by makes (incl. inst) #
10 # "make install" installs executables in INSTALL_DIR #
11 # (or if it's me, in CB_INSTALL #
12 # also installs gmt scripts. #
13 # #
14 #%// Bert Kampes 27-Dec-2000 #
15 ### RCS #
16 # $Header: /users/kampes/DEVELOP/DORIS/SARtools/RCS/Makefile, #
17 # v 3.8 2004/08/06 15:41:24 kampes Exp $ #
18 #%// TUDelft 16-Apr-2009 #
19 #################################################################
20
21 ### The shell we're using ###
22 SHELL = /bin/sh
23
24 ### Installdirdef should exist!
25 #INSTALL_DIR = /usr/local/bin
26 INSTALL_DIR = /home/dlevelt/src/Doris_s1_git/bin
27
28 ### GCC compiler
29 CC = g++
30 CFLAGS = -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE #-m32 to force 32bit on 64bit platform
31
32 ### Intel compiler
33 #CC = icpc
34 #CFLAGS = -Wp64 # -fast -O3 -parallel -auto-ilp32 -pc32
35
36 ##################################################################
37 ### THERE SHOULD BE NOTHING YOU WANT TO CHANGE BELOW THIS LINE ###
38 ##################################################################
39 ### Only for me, this will be ignored...
40 CB_INSTALL = ../../executables/64bit
41
42 ### The programs we want
43 PROGS = wrap \
44 bkconvert \
45 cpxmult \
46 cpxdiv \
47 cpxconj \
48 flapjack \
49 cpxfiddle \
50 floatmult \
51 floatmask \
52 readrasterheader \
53 rasterheader \
54 dateconv
55
56 # usedin install:
57 SCRIPTS =
58 #SCRIPTS = cpx2ps \
59 # philamh2ps
60
61 ### Compilation
62 default: all
63 all: $(PROGS) dummy
64
65 # dummy, since else makefile want to recompile the last util.
66 dummy:
67
68 # the utilities.
69 bkconvert: bkconvert.o
70 $(CC) $(CFLAGS) [email protected] -o $@
71 wrap: wrap.o
72 $(CC) $(CFLAGS) [email protected] -o $@
73 cpxmult: cpxmult.o
74 $(CC) $(CFLAGS) [email protected] -o $@
75 cpxdiv: cpxdiv.o
76 $(CC) $(CFLAGS) [email protected] -o $@
77 cpxconj: cpxconj.o
78 $(CC) $(CFLAGS) [email protected] -o $@
79 cpxfiddle: cpxfiddle.o
80 $(CC) $(CFLAGS) [email protected] -o $@
81 flapjack: flapjack.o
82 $(CC) $(CFLAGS) [email protected] -o $@
83 floatmask: floatmask.o
84 $(CC) $(CFLAGS) [email protected] -o $@
85 floatmult: floatmult.o
86 $(CC) $(CFLAGS) [email protected] -o $@
87 readrasterheader: readrasterheader.o
88 $(CC) $(CFLAGS) [email protected] -o $@
89 rasterheader: rasterheader.o
90 $(CC) $(CFLAGS) [email protected] -o $@
91 dateconv: dateconv.o
92 $(CC) $(CFLAGS) [email protected] -o $@
93
94
95 ### Install in CB_INSTALL by linking/copying executables ###
96 install: $(PROGS)
97 dir=$(CB_INSTALL); \
98 if test -d $$dir; then \
99 $(MAKE) cbinstall; else $(MAKE) definstall; fi;
100
101 # or use ln instead of cp
102 # ln -sf `pwd`/$$p $(CB_INSTALL)/$$p; \
103
104 ### Use symbolic links at our system, copy to /usr/local/bin on other.
105 definstall: $(PROGS)
106 dir=$(INSTALL_DIR); \
107 if test ! -d $$dir; then \
108 echo "Sorry, dir $(INSTALL_DIR) does not exist, exiting..."; exit; fi; \
109 echo Installing in directory: $$dir; \
110 list='$(PROGS) $(SCRIPTS)'; for p in $$list; do \
111 echo "Installing (copy): $$p"; \
112 cp -f $$p $(INSTALL_DIR)/$$p; \
113 done
114 $(MAKE) cleaner
115
116 ### Use symbolic links at our system, copy to /usr/local/bin on other.
117 cbinstall:
118 dir=$(CB_INSTALL); \
119 if test ! -d $$dir; then \
120 echo "Sorry, dir $(CB_INSTALL) does not exist, exiting..."; exit; fi; \
121 echo Installing in directory: $$dir; \
122 list='$(PROGS) $(SCRIPTS)'; for p in $$list; do \
123 echo "Installing (copy): $$p"; \
124 cp -f $$p $(CB_INSTALL)/$$p; \
125 done
126 $(MAKE) cleaner
127
128 lninstall:
129 dir=$(CB_INSTALL); \
130 if test ! -d $$dir; then \
131 echo "Sorry, you are not me, exiting..."; exit; fi; \
132 echo Installing in directory: $$dir; \
133 list='$(PROGS) $(SCRIPTS)'; for p in $$list; do \
134 echo "Installing (link): $$p"; \
135 cp -f `pwd`/$$p $(CB_INSTALL)/$$p; \
136 done
137 #ln -sf `pwd`/$$p $(CB_INSTALL)/$$p; \
138 $(MAKE) cleaner
139
140 ### Helpers ###
141 clean:
142 @rm -f *.o *dummy* *.bak
143 @echo "* Removed junk."
144 ### some reason under cygwin progs are not removed without ".exe"???
145 CYGWIN_EXE = $(PROGS:=.exe)
146 cleaner: clean
147 @rm -f $(PROGS) $(CYGWIN_EXE) a.out
148 @echo "* Removed executables in source dir: `pwd`."
149 uninstall: cleaner
150 dir=$(CB_INSTALL); \
151 if test -d $$dir; then \
152 cd $(CB_INSTALL); rm -f $(PROGS); \
153 echo "* Removed executables in install dir: $(CB_INSTALL)."; fi;
154 dir=$(INSTALL_DIR); \
155 if test -d $$dir; then \
156 cd $(INSTALL_DIR); rm -f $(PROGS) $(CYGWIN_EXE); \
157 echo "* Removed executables in install dir: $(INSTALL_DIR)."; fi;
158
159 ### How to make object files ###
160 .cc.o:
161 $(CC) $(CFLAGS) -c -o $(@) $<
162
163 ### EOF.
164