File: make.options

package info (click to toggle)
hdf-eos5 5.1.13.dfsg.1-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 23,304 kB
  • sloc: ansic: 77,198; fortran: 32,428; sh: 9,521; makefile: 609; csh: 4
file content (513 lines) | stat: -rwxr-xr-x 13,017 bytes parent folder | download | duplicates (11)
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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
#########################################################################
#
# Name
#	make.options
#
# Purpose
#
#	Sets make options for building DM code. All individual makefiles
#	include this file.
#
# Level
#
#	CLS Subsystem
#
# Input
#
#	Variables to be set in the makefile before including this file
#
#	CSCI - indicates which CSCI is the makefile part of.
#
#	.buildrc must be sourced since variables set by that script
#	are used in this file.
#
# Outputs
#
########################################################################


###################### SET BUILDTOP BASED ON CSCI #####################
#
# Buildtop is the top level directory for the CSCI
# The makefile must define CSCI before including this file
#
#######################################################################


BUILDTOP    = $(SUBSYSTOP)/$(CSCI)


###################### SET VARIOUS DIRECTORIES #########################
#
# THESE DIRECTORIES ARE BASED ON ARCHITECTURE
#
########################################################################


## LIBDIR is the directory where the DM libraries reside
LIBDIR		=  $(BUILDTOP)/lib/$(ARCH)

## INCDIR is the directory where the DM include files reside
INCDIR		= $(BUILDTOP)/include

## BINDIR is the directory where the CSCI executables reside
BINDIR		= $(BUILDTOP)/bin/$(ARCH)

## SRCDIR is the directory where the CSCI source files reside
SRCDIR		= $(BUILDTOP)/src

## OBJDIR is the directory where the CSCI object files reside
OBJDIR		= $(BUILDTOP)/obj/$(ARCH)

## SUBSYSINCDIR is the location for CSCI common header files.
SUBSYSINCDIR	= $(SUBSYSTOP)/common/include

## ECSINCDIR is the location for ECS common header files (common software)
ECSINCDIR	= /ecs/include

## SUBSYSLIBDIR is the location for CSCI common library files.
SUBSYSLIBDIR	= $(SUBSYSTOP)/common/lib/$(ARCH)

## ECSLIBDIR is the location for ECS common library files (common software)
ECSLIBDIR	= /ecs/lib/$(ARCH)


###################### CONFIGURATION DEPENDENCY ########################
#
# CR_DEPENDENCIES are the files to be included in the 
# Configuration Record.
#
########################################################################

CR_DEPENDENCIES	= \
		$(SUBSYSTOP)/.buildrc \
		$(SUBSYSTOP)/make/.bldhost.$(ARCH) \
		$(SUBSYSTOP)/make/make.options \
		./Makefile



###################### COMMON FLAGS FOR C/C++ ##########################
#
# These flags are common for both C and C++ compilation (based on ARCH).
#
########################################################################

## PLATFORM_FLAG is used for writing platform specific ecs code (must be 
## used with caution and justification).

PLATFORM_FLAG_hp	= -DHPUX9X
PLATFORM_FLAG_sgi	= -DIRIX5X
PLATFORM_FLAG_sun5	= -DSUNOS5X

PLATFORM_FLAG		= $(PLATFORM_FLAG_$(ARCH))


## DEBUG_FLAG specifies whether code is optimized or set for the debugger
## as well as defining debug flags needed for conditional compilation

DEBUG_FLAG_hp	= -g
DEBUG_FLAG_sgi	= -g
DEBUG_FLAG_sun5	= -g

DEBUG_FLAG	= $(DEBUG_FLAG_$(ARCH))


## ANSI_FLAG is to specify ANSI compliance
ANSI_FLAG_hp	    = -Aa +a1 +eh
ANSI_FLAG_sgi	    = 
ANSI_FLAG_sun5     = 

ANSI_FLAG	    = $(ANSI_FLAG_$(ARCH))


## INCLUDE_PATH is the common include path.
INCLUDE_PATH		= -I$(SUBSYSINCDIR) -I$(INCDIR) -I$(ECSINCDIR)

## COMMON_FLAGS is a handy macro to include all the flags above
COMMON_FLAGS	= $(DEBUG_FLAG) $(ANSI_FLAG) $(PLATFORM_FLAG) \
		    $(INCLUDE_PATH) $(LOCAL_COMMON_FLAGS)

X11_MOTIF_FLAGS_sun5	= -I/opt/SUNWmotif/include \
			-I/usr/openwin/include -D_REENTRANT -DSYSV
X11_MOTIF_FLAGS_sgi	= -I/usr/include/X11 -I/usr/include/Xm
X11_MOTIF_FLAGS_hp	= -I/usr/include/X11R5 \
			  -I/usr/include/Motif1.2 \
			  -DHP9000 -D_POSIX_SOURCE \
			  -D_HPUX_SOURCE -D_REENTRANT \
			-DMOTIF1_2 -I/usr/include/reentrant
X11_MOTIF_FLAGS		= $(X11_MOTIF_FLAGS_$(ARCH))

EPAK_FLAGS_sun5		= -I/tools/bx50/epak3/include -I/tools/bx50/epak3/include/X11
EPAK_FLAGS_sgi		= -I/tools/bx50/epak3/include -I/tools/bx50/epak3/include/X11

EPAK_FLAGS_hp		= -I/tools/bx50/include
EPAK_FLAGS		= $(EPAK_FLAGS_$(ARCH))

ROGUEWAVE_FLAGS_sun5	=
ROGUEWAVE_FLAGS_hp	= -I/tools/rogue -DRWDEBUG
ROGUEWAVE_FLAGS_sgi	= -I/tools/rogue -DRWDEBUG
ROGUEWAVE_FLAGS		= $(ROGUEWAVE_FLAGS_$(ARCH))

ECS_COMMON_DIR		= /ecs/formal/COMMON
ECS_COMMON_INC		= -I$(ECS_COMMON_DIR)/include

## COMMON_FLAGS are the flags common for both C source and C++ source.
LOCAL_COMMON_FLAGS	= -I. $(X11_MOTIF_FLAGS) $(EPAK_FLAGS) $(ROGUEWAVE_FLAGS) \
				$(ECS_COMMON_INC) -DLOGIN -DFUNCPROTO -DXTFUNCPROTO


###################### C COMPILER SETUP ##################################
#
# Following flags setup the common options for the C compiler based on ARCH
#
##########################################################################

## CC is the name of the C compiler to use
CC_hp		= cc
CC_sgi		= cc
CC_sun5		= cc
CC		= $(CC_$(ARCH))


## CCOMMON_FLAG are other common C flags
CCOMMON_FLAGS_hp    = -c
CCOMMON_FLAGS_sgi   = -c
CCOMMON_FLAGS_sun5  = -c

CCOMMON_FLAGS	    = $(CCOMMON_FLAGS_$(ARCH))

## CFLAGS is a combination of all the above. The applications can include
## additional CFLAGS in the makefile.
CFLAGS		    = $(COMMON_FLAGS) $(CCOMMON_FLAGS)


###################### C++ COMPILER SETUP ################################
#
# Following flags setup the common options for the C++ compiler based on ARCH
#
##########################################################################

## CXX is the name of the C++ compiler to use
CXX_hp		= CC
CXX_sgi		= CC
CXX_sun5	= CC

CXX		= $(CXX_$(ARCH))


## CXXCOMMON_FLAG are other common C flags
CXXCOMMON_FLAGS_hp    = -c
CXXCOMMON_FLAGS_sgi   = -c -x
CXXCOMMON_FLAGS_sun5  = -c

CXXCOMMON_FLAGS	    = $(CXXCOMMON_FLAGS_$(ARCH))

## CXXFLAGS is a combination of all the above. The applications can include
## additional CXXFLAGS in the makefile.

CXXFLAGS    = $(TEMPLATE_OPTION) $(COMMON_FLAGS)  $(CXXCOMMON_FLAGS)


###################### Library setup #####################################
#
# Building libraries etc.
#
##########################################################################


## AR is the name of the archive utility
AR_hp	    = ar
AR_sgi	    = ar
AR_sun5	    = ar

AR	    = $(AR_$(ARCH))


## AR_FLAGS are the flags to use for archive command.

AR_FLAGS_hp	= -r
AR_FLAGS_sgi	= -r
AR_FLAGS_sun5	= -r

AR_FLAGS	= $(AR_FLAGS_$(ARCH))



###################### LINKER SETUP ######################################
#
# Following flags setup the common options for the linker
#
##########################################################################


## LD is the name of the linker to use
LD_hp		= $(CXX)
LD_sgi		= $(CXX)
LD_sun5		= /opt/SUNWspro/bin/CC

LD		= $(LD_$(ARCH))


## LIB_PATH is the path for ecs specific libraries
LIB_PATH		= -L$(SUBSYSLIBDIR) -L$(LIBDIR) -L$(ECSLIBDIR)

## Motif Libraries
X11_MOTIF_LIB_sun5	= -L/usr/openwin/lib -L/opt/SUNWmotif/lib \
				-lXm -lXt -lX11 -lnsl -lgen
X11_MOTIF_LIB_sgi	= -L/usr/lib -lXm -lXt -lX11
X11_MOTIF_LIB_hp	= -L/usr/lib/Motif1.2 -L/usr/lib/X11R5	\
				-lXm -lXt -lX11 -lC
X11_MOTIF_LIB		= $(X11_MOTIF_LIB_$(ARCH))

## EPak Libraries
EPAK_LIB_sun5		= /tools/bx50/epak3/lib/libEPak.a
EPAK_LIB_sgi		= /tools/bx50/epak3/lib/libEPak.a
EPAK_LIB_hp		= /tools/bx50/lib/libXiWidgets.a
EPAK_LIB		= $(EPAK_LIB_$(ARCH))

## ROGUEWAVE Libraries
ROGUEWAVE_LIB_sun5	= -lrwtool
ROGUEWAVE_LIB_sgi	= -L/tools/rogue/lib -lrwtoolg
ROGUEWAVE_LIB_hp	= -DRW_POSIX_THREADS -L/tools/rogue/lib -lrwtoolg_mteh
ROGUEWAVE_LIB		= $(ROGUEWAVE_LIB_$(ARCH))

## LDCOMMON_FLAGS are other common flags used
LDCOMMON_FLAGS_hp	= 
LDCOMMON_FLAGS_sgi	= -lc
LDCOMMON_FLAGS_sun5	= -lm -lc

LDCOMMON_FLAGS		= $(LDCOMMON_FLAGS_$(ARCH))


## LD_FLAGS are common linker flags
LD_FLAGS	= $(LIB_PATH) $(EPAK_LIB) $(X11_MOTIF_LIB) $(LDCOMMON_FLAGS) $(ROGUEWAVE_LIB)


###################### IDL SETUP #########################################
#
# Idl files compilation rules etc (this is for DCE)
#
##########################################################################


## command for idl compiler
IDL_hp          = idl
IDL_sgi		= idl
IDL_sun5	= idl

IDL		= $(IDL_$(ARCH))


## Flags for the idl compiler
IDL_FLAGS_hp	= -keep c_source
IDL_FLAGS_sgi	=
IDL_FLAGS_sun5	= -keep c_source

IDL_FLAGS	= $(IDL_FLAGS_$(ARCH))


###################### IDL++ SETUP #######################################
#
# Idl files compilation rules etc (this is for OODCE)
#
##########################################################################


## command for idl++ compiler (not supported on SGI)
IDLXX_hp	    = idl++
IDLXX_sun5	    = idl++

IDLXX		    = $(IDLXX_$(ARCH))


## Flags for the idl compiler
IDLXXFLAGS_hp		= -keep source
IDLXXFLAGS_sun5		= -keep source

IDLXXFLAGS	= $(IDLXXFLAGS_$(ARCH))


###################### DCE SETUP #########################################
#
# These are popular options for building DCE applications
#
##########################################################################

## COMPILER Options

DCECFLAGS_hp	    = -I. -D_POSIX_SOURCE  -D_REENTRANT  +z -q
DCECFLAGS_sgi	    = -I.
DCECFLAGS_sun5	    = -I.


DCECFLAGS	    = $(DCECFLAGS_$(ARCH))

### Linker options. These to be included before object files
DCELDFLAGS_hp	    = -Wl,-a,archive_shared
DCELDFLAGS_sun5	    = 
DCELDFLAGS_sgi	    = 

DCELDFLAGS	    = $(DCELDFLAGS_$(ARCH))

## Libraries
DCELIBS_hp	    = -lbb -ldce -lm -lc_r
DCELIBS_sgi	    =
DCELIBS_sun5	    = -lnsl -ldce -lsocket -lthread -lm

DCELIBS		    = $(DCELIBS_$(ARCH))


###################### OODCE SETUP #######################################
#
# These are popular options for building OODCE applications.
#
##########################################################################

## C COMPILER Options

OODCECFLAGS_hp	    = -I. -D_POSIX_SOURCE  -D_REENTRANT  +z -q
OODCECFLAGS_sgi	    =
OODCECFLAGS_sun5    = -I. -DREENTRANT


OODCECFLAGS	    = $(OODCECFLAGS_$(ARCH))

## C++ COMPILER Options

OODCECXXFLAGS_hp	    = -I. -I/usr/include/reentrant +eh \
				-Dunix -DNIDL_PROTOTYPES -D__STDC__ \
				-D_HPUX_SOURCE -D_CMA_PROTO_ -D_REENTRANT
ODCECXXFLAGS_sgi	    =
OODCECXXFLAGS_sun5	    = -I. -I/opt/SUNWspro/SC3.0.1/include/CC -mt \
				-Dunix -DNIDL_PROTOTYPES -D_CMA_PROTO_ -DSYSV

OODCECXXFLAGS	    = $(OODCECXXFLAGS_$(ARCH))

### Linker options. These to be included before object files
OODCELDFLAGS_hp	    = +eh -g -Wl,-aarchive
OODCELDFLAGS_sgi    =
OODCELDFLAGS_sun5   =


OODCELDFLAGS	    = $(OODCELDFLAGS_$(ARCH))

## Libraries
OODCELIBS_hp	    = -loodce -lbb -ldce -lm -lc_r
OODCELIBS_sgi	    =
OODCELIBS_sun5	    = -loodce -ldce -lthread -lnsl -lsocket -lm -lc

OODCELIBS	    = $(OODCELIBS_$(ARCH))


###################### CLEANUP SUPPORT ###################################
#
# DEFINE COMMANDS TO DELETE FILES ETC. USED BY THE CLEAN TARGET.
#
##########################################################################

DELFILES    =	rm -f


###################### Suffix setup and default rules ####################
#
# Add ecs specific suffixes and common rules for building object files.
#
##########################################################################


## Define custom ecs suffixes (.cxx is a c++ source file)
.SUFFIXES: .cxx .C .cpp .idl $(SUFFIXES)


## Define how to convert c++ file to object. Note that all object
## files are copied to the OBJDIR.
## Individual makefiles may define CSTM_CXXFLAGS to include
## custom C++ flags in compilation.

ifdef SILENTMODE
$(OBJDIR)/%.o: %.cxx
	@echo Compiling $< ...
	@rm -f $@
	@$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@

$(OBJDIR)/%.o: %.cpp
	@echo Compiling $< ...
	@rm -f $@
	@$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@


$(OBJDIR)/%.o: %.C
	@echo Compiling $< ...
	@rm -f $@
	@$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@

%.o: %.C
	@echo Compiling $< ...
	@rm -f $@
	@$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@
%.o: %.cpp
	@echo Compiling $< ...
	@rm -f $@
	@$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@
%.o: %.cxx
	@echo Compiling $< ...
	@rm -f $@
	@$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@
else
$(OBJDIR)/%.o: %.cxx
	rm -f $@
	$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@

$(OBJDIR)/%.o: %.cpp
	rm -f $@
	$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@

$(OBJDIR)/%.o: %.C
	rm -f $@
	$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@

%.o: %.C
	rm -f $@
	$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@
%.o: %.cxx
	rm -f $@
	$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@
%.o: %.cpp
	rm -f $@
	$(CXX) $(CXXFLAGS) $(CSTM_CXXFLAGS) $< -o $@
endif

## Define how to convert c file to object. Note that all object
## files are copied to the OBJDIR.
## Individual makefiles may define CSTM_CFLAGS to include
## custom C flags in compilation.

ifdef SILENTMODE
$(OBJDIR)/%.o: %.c
	@echo Compiling $< ...
	@rm -f $@
	@$(CC) $(CFLAGS) $(CSTM_CFLAGS) $< -o $@
%.o: %.c
	@echo Compiling $< ...
	@rm -f $@
	@$(CC) $(CFLAGS) $(CSTM_CFLAGS) $< -o $@

else
$(OBJDIR)/%.o: %.c
	rm -f $@
	$(CC) $(CFLAGS) $(CSTM_CFLAGS) $< -o $@
%.o: %.c
	rm -f $@
	$(CC) $(CFLAGS) $(CSTM_CFLAGS) $< -o $@

endif

include $(CMTOP)/COMMON/make/makecm.options
 
## DO NOT ADD ANYTHING AFTER THIS LINE ##