File: Makefile.org

package info (click to toggle)
shapetools 1.4pl6-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,676 kB
  • ctags: 4,637
  • sloc: ansic: 39,064; makefile: 4,011; sh: 1,269; lisp: 773; sed: 55; awk: 10
file content (456 lines) | stat: -rw-r--r-- 13,518 bytes parent folder | download | duplicates (10)
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# # Copyright (C) 1993,1994 by the author(s).
#
# This software is published in the hope that it will be useful, but
# WITHOUT ANY WARRANTY for any part of this software to work correctly
# or as described in the manuals. See the ShapeTools Public License
# for details.
#
# Permission is granted to use, copy, modify, or distribute any part of
# this software but only under the conditions described in the ShapeTools
# Public License. A copy of this license is supposed to have been given
# to you along with ShapeTools in a file named LICENSE. Among other
# things, this copyright notice and the Public License must be
# preserved on all copies.

#
# Makefile for the ShapeTools
#
# $Header: Makefile[5.1] Tue Aug 23 17:34:52 1994 andy@cs.tu-berlin.de frozen $
#

# The base directory of the shape source tree.

BASE = /home/stone/shape/development

# The operating system. Supported platforms are:
#	s_aix      -- AIX (tested on IBM RS6000 with AIX 3.2.0)
#	s_hpux     -- HP/UX (tested on HP 9000 with HP/UX 9.0)
#	s_irix	   -- IRIX (tested on Silicon Graphics with IRIX 4.0.5)
#	s_mach	   -- mach (tested on NextStation with Mach 3.0)
#	s_sunos_4  -- SunOS 4 (tested on SUN 4 with SunOS 4.1.3)
#	s_sol_2    -- Solaris 2 (tested on SUN 20 with SunOS 5.5)
#	s_svr_4    -- Sys V Rel.4 (tested on a '386 machine with ESIX)
#	s_ultrix_4 -- Ultrix (tested on DECStation 5000 with Ultrix 4.2)
# For installing the toolkit on other operating systems see the
# README file in this directory.

HOSTSYSTEM = s_sol_2

# The processor type (may be empty).

HOSTTYPE = sol2

# Preprocessor switches.
# Set "-DSYSLOG" if you want to have internal diagnostic messages
# handled by the syslog package.

SWITCHES =

# Needed system libraries.
# As the shape toolkit uses "re_comp" (regular expressions),
# System V machines require an additional library to be linked.
# This is usally "SYSLIBS = -lPW".

SYSLIBS =

# Path of a subsystem relative to the root of the system hierarchy
# (e.g. vc/save)

NODEPATH =

# A short name for the (sub)system (used for building the release ID)

NODENAME = shapeTools

# The installation base directory.
# Make sure, that the subdirectories "bin", "include", and "lib"
# exist in installation directory.

INSTALLBASE = /usr/local

# Locations and modes for the installation of executables, header
# files, libraries and manuals.

INSTALLBINPATH = $(INSTALLBASE)/bin
INSTALLBINMODE = 755
INSTALLINCPATH = $(INSTALLBASE)/include
INSTALLINCMODE = 444
INSTALLLIBPATH = $(INSTALLBASE)/lib
INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape
INSTALLEMACSLISPPATH = $(INSTALLBASE)/lib/emacs/lisp
INSTALLLIBMODE = 644
INSTALLMANPATH = $(INSTALLBASE)/man
INSTALLMANMODE = 444

# Directories, where local libraries and header files are to be
# installed for project wide use.

LOCALLIBPATH     = $(BASE)/lib
LOCALINCLUDEPATH = $(BASE)/include

# --------------------------------------------------------------------
#		the system's components
# --------------------------------------------------------------------

#
# The system (program, library, etc.) to be built. If you want to
# manage multiple programs, you should introduce multiple targets
# (like TARGET1 TARGET2 or any better names). In this case you
# have to adjust the system building actions accordingly.

TARGET =

# The release number generator. The version number of this file will
# be used as release identifier for the whole system.

VERSIONFILE = Release   # source

# The names of the subdirectories containing subsystems which are also
# to be built.

SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc  src/rms src/interface src/patches
#SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/interface src/rms src/patches tutorial

# The regular source and header files.

SOURCES = CHANGES-1.4 README LICENSE INSTALL SUPPORT shape_conf.sh Questionnaire

HEADERS =

# All source components of the system (should not be changed)

COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies

# --------------------------------------------------------------------
#		tools, flags, libraries etc.
# --------------------------------------------------------------------

SHELL=/bin/sh

INCLUDES = -I$(LOCALINCLUDEPATH)
MAKECFLAGS = -O -DATFS_OWN_LOCKING
MAKELDFLAGS = -s

CC = cc
CFLAGS  = $(INCLUDES) $(MAKECFLAGS) -D$(HOSTSYSTEM) $(SWITCHES)
LDFLAGS = $(MAKELDFLAGS)

RANLIB  = ranlib

CONFIGSCRIPT = ./shape_conf.sh

# System libraries, local libraries and lint libraries.

LOCALLIBS =
LINTLIBS  =

# --------------------------------------------------------------------
#			the targets
# --------------------------------------------------------------------

# The default action (do not change)

all: +all $(ALLTARGETS)

config: configure

configure:
	@$(CONFIGSCRIPT) `pwd`

# The final system building action.

targets: $(TARGET)

DOLIBRARIES = yes

DOSHAREDLIBS = no

DOEMACSLISP = yes

installtargets: installmanuals

installmanuals: $(MANUALS)
	@-echo "installing manuals in $(INSTALLMANPATH)"; \
	if [ "$(INSTALLMANPATH)" = "$(BASE)/man" ]; \
	then \
	  exit 0; \
	fi; \
	_manuals=`ls man/man1`; \
	for i in $$_manuals; \
	do \
          if [ -f $(INSTALLMANPATH)/man1/$$i ] && \
             [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \
          then \
            chmod u+w $(INSTALLMANPATH)/man1/$$i; \
          fi; \
          cp man/man1/$$i $(INSTALLMANPATH)/man1/$$i; \
          chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \
	done; \
	if [ "$(DOLIBRARIES)" = yes ]; \
	then \
	  _manuals=`ls man/man3`; \
	  for i in $$_manuals; \
	  do \
            if [ -f $(INSTALLMANPATH)/man3/$$i ] && \
               [ ! -w $(INSTALLMANPATH)/man3/$$i ]; \
            then \
              chmod u+w $(INSTALLMANPATH)/man3/$$i; \
            fi; \
            cp man/man3/$$i $(INSTALLMANPATH)/man3/$$i; \
            chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man3/$$i; \
	  done; \
	  _manuals=`ls man/man5`; \
	  for i in $$_manuals; \
	  do \
            if [ -f $(INSTALLMANPATH)/man5/$$i ] && \
               [ ! -w $(INSTALLMANPATH)/man5/$$i ]; \
            then \
              chmod u+w $(INSTALLMANPATH)/man5/$$i; \
            fi; \
            cp man/man5/$$i $(INSTALLMANPATH)/man5/$$i; \
            chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man5/$$i; \
	  done; \
	fi; \
	_manuals=`ls man/man7`; \
	for i in $$_manuals; \
	do \
          if [ -f $(INSTALLMANPATH)/man7/$$i ] && \
             [ ! -w $(INSTALLMANPATH)/man7/$$i ]; \
          then \
            chmod u+w $(INSTALLMANPATH)/man7/$$i; \
          fi; \
	  cp man/man7/$$i $(INSTALLMANPATH)/man7/$$i; \
	  chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man7/$$i; \
	done

# The cleanup action. Removes all automatically rederivable files.

doclean:
	rm -f $(TARGET) $(ALIASES) $(OBJECTS) \
	lib/libAtFS.a.old lib/libAtFS.a lib/libsttk.old.a \
	lib/libsttk.a lib/libAtFStk.old.a lib/libAtFStk.a \
	include/atfs.h include/afsys.h include/config.h \
	include/sttk.h include/atfstk.h

# Recursive builds. Performed *before* building $(TARGET)

subsystems:
	@-_subsystems="$(SUBSYSTEMS)"; \
	for i in $$_subsystems; \
	do \
	  maketarget=$(MAINTARGET); \
	  installlibpath=$(INSTALLLIBPATH); \
	  installincpath=$(INSTALLINCPATH); \
	  libpath=$(LOCALLIBPATH); \
	  includepath=$(LOCALINCLUDEPATH); \
	  if [ $$i = src/atfs -o $$i = src/sttk -o $$i = src/atfstk ]; \
	  then \
	    if [ "$(MAINTARGET)" = all ]; \
	    then \
	      maketarget=localinstall; \
	      if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \
	      then \
		installlibpath=/tmp; \
	      fi; \
	      if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \
	      then \
		installincpath=/tmp; \
	      fi; \
	    elif [ "$(MAINTARGET)" = install ]; \
	    then \
	      if  [ "$(DOLIBRARIES)" = no ]; \
	      then \
	        maketarget="noinstall localinstall"; \
	      else \
	        maketarget="install localinstall"; \
	      fi; \
	      if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \
	      then \
		libpath=/tmp; \
		maketarget=`echo $$maketarget | sed -e s/localinstall//`; \
	      fi; \
	      if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \
	      then \
		includepath=/tmp; \
		maketarget=`echo $$maketarget | sed -e s/localinstall//`; \
	      fi; \
	    else \
	      if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \
	      then \
		installlibpath=/tmp; \
	      fi; \
	      if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \
	      then \
		installincpath=/tmp; \
	      fi; \
	    fi; \
	  fi; \
	  echo cd $$i; \
	  (cd $$i; $(MAKE) \
		BASE=$(BASE) \
		HOSTSYSTEM=$(HOSTSYSTEM) \
		HOSTTYPE=$(HOSTTYPE) \
		SWITCHES="$(SWITCHES)" \
		INSTALLBASE=$(INSTALLBASE) \
		INSTALLBINPATH=$(INSTALLBINPATH) \
		INSTALLBINMODE=$(INSTALLBINMODE) \
		INSTALLINCPATH=$$installincpath \
		INSTALLINCMODE=$(INSTALLINCMODE) \
		INSTALLLIBPATH=$$installlibpath \
		INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \
		INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \
		INSTALLLIBMODE=$(INSTALLLIBMODE) \
		INSTALLMANPATH=$(INSTALLMANPATH) \
		INSTALLMANMODE=$(INSTALLMANMODE) \
		LOCALLIBPATH=$$libpath \
		LOCALINCLUDEPATH=$$includepath \
		MAKE="$(MAKE)" \
		CC="$(CC)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		RANLIB="$(RANLIB)" \
		SYSLIBS="$(SYSLIBS)" \
		BINDDEFAULT=$(BINDDEFAULT) \
		BINDINSTALL=$(BINDINSTALL) \
		COMPILER=$(COMPILER) \
		QUALITY=$(QUALITY) \
		TOTALRELEASEBASE=$(TOTALRELEASEBASE) \
		PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \
		ALLTARGETS= \
		MAINTARGET= \
		SHAPELIBPATH=$(SHAPELIBPATH) $$maketarget ); \
	done

# --------------------------------------------------------------------
#			internals (do not modify)
# --------------------------------------------------------------------

install: +install $(ALLTARGETS)

clean: +clean $(ALLTARGETS)

+all:
	@-if [ ! -f .configured ]; \
	then \
	  echo; echo "Initial build of shapeTools on this machine."; \
	  ./shape_conf.sh `pwd`; \
	  echo; echo "Got it ! Now call 'make' again to start system build."; \
          exit 0; \
	fi; \
	if [ -n "$(ALLTARGETS)" ]; \
	then : ; \
	else \
	  $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \
		BASE=$(BASE) \
		HOSTSYSTEM=$(HOSTSYSTEM) \
		HOSTTYPE=$(HOSTTYPE) \
		SWITCHES="$(SWITCHES)" \
		INSTALLBASE=$(INSTALLBASE) \
		INSTALLBINPATH=$(INSTALLBINPATH) \
		INSTALLBINMODE=$(INSTALLBINMODE) \
		INSTALLINCPATH=$(INSTALLINCPATH) \
		INSTALLINCMODE=$(INSTALLINCMODE) \
		INSTALLLIBPATH=$(INSTALLLIBPATH) \
		INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \
		INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \
		INSTALLLIBMODE=$(INSTALLLIBMODE) \
		INSTALLMANPATH=$(INSTALLMANPATH) \
		INSTALLMANMODE=$(INSTALLMANMODE) \
		LOCALLIBPATH=$(LOCALLIBPATH) \
		LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \
		MAKE="$(MAKE)" \
		CC="$(CC)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		RANLIB="$(RANLIB)" \
		SYSLIBS="$(SYSLIBS)" \
		BINDDEFAULT=$(BINDDEFAULT) \
		BINDINSTALL=$(BINDINSTALL) \
		COMPILER=$(COMPILER) \
		QUALITY=$(QUALITY) \
		TOTALRELEASEBASE=$(TOTALRELEASEBASE) \
		PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \
		SHAPELIBPATH=$(SHAPELIBPATH) all; \
	fi

+install:
	@-if [ ! -f .configured ]; \
	then \
	  echo; echo "Initial build of shapeTools on this machine."; \
	  ./shape_conf.sh `pwd`; \
	  echo; echo "Got it ! Now call 'make install' again to start system build and installation."; \
          exit 0; \
	fi; \
	if [ -n "$(ALLTARGETS)" ]; \
	then : ; \
	else \
	  $(MAKE) ALLTARGETS="subsystems installtargets" \
		MAINTARGET=install \
		BASE=$(BASE) \
		HOSTSYSTEM=$(HOSTSYSTEM) \
		HOSTTYPE=$(HOSTTYPE) \
		SWITCHES="$(SWITCHES)" \
		INSTALLBASE=$(INSTALLBASE) \
		INSTALLBINPATH=$(INSTALLBINPATH) \
		INSTALLBINMODE=$(INSTALLBINMODE) \
		INSTALLINCPATH=$(INSTALLINCPATH) \
		INSTALLINCMODE=$(INSTALLINCMODE) \
		INSTALLLIBPATH=$(INSTALLLIBPATH) \
		INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \
		INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \
		INSTALLLIBMODE=$(INSTALLLIBMODE) \
		INSTALLMANPATH=$(INSTALLMANPATH) \
		INSTALLMANMODE=$(INSTALLMANMODE) \
		LOCALLIBPATH=$(LOCALLIBPATH) \
		LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \
		MAKE="$(MAKE)" \
		CC="$(CC)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		RANLIB="$(RANLIB)" \
		SYSLIBS="$(SYSLIBS)" \
		BINDDEFAULT=$(BINDDEFAULT) \
		BINDINSTALL=$(BINDINSTALL) \
		COMPILER=$(COMPILER) \
		QUALITY=$(QUALITY) \
		TOTALRELEASEBASE=$(TOTALRELEASEBASE) \
		PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \
		SHAPELIBPATH=$(SHAPELIBPATH) install; \
	fi

+clean:
	@-if [ -n "$(ALLTARGETS)" ]; \
	then : ; \
	else \
	  $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \
		BASE=$(BASE) \
		HOSTSYSTEM=$(HOSTSYSTEM) \
		HOSTTYPE=$(HOSTTYPE) \
		SWITCHES="$(SWITCHES)" \
		INSTALLBASE=$(INSTALLBASE) \
		INSTALLBINPATH=$(INSTALLBINPATH) \
		INSTALLBINMODE=$(INSTALLBINMODE) \
		INSTALLINCPATH=$(INSTALLINCPATH) \
		INSTALLINCMODE=$(INSTALLINCMODE) \
		INSTALLLIBPATH=$(INSTALLLIBPATH) \
		INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \
		INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \
		INSTALLLIBMODE=$(INSTALLLIBMODE) \
		INSTALLMANPATH=$(INSTALLMANPATH) \
		INSTALLMANMODE=$(INSTALLMANMODE) \
		LOCALLIBPATH=$(LOCALLIBPATH) \
		LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \
		MAKE="$(MAKE)" \
		CC="$(CC)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		RANLIB="$(RANLIB)" \
		SYSLIBS="$(SYSLIBS)" \
		BINDDEFAULT=$(BINDDEFAULT) \
		BINDINSTALL=$(BINDINSTALL) \
		COMPILER=$(COMPILER) \
		QUALITY=$(QUALITY) \
		TOTALRELEASEBASE=$(TOTALRELEASEBASE) \
		PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \
		SHAPELIBPATH=$(SHAPELIBPATH) clean; \
	fi