source: gpfs_3.1_ker2.6.20/lpp/mmfs/src/misc/makefile @ 148

Last change on this file since 148 was 16, checked in by rock, 17 years ago
File size: 11.2 KB
RevLine 
[16]1# Makefile generated by imake - do not edit!
2# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $
3
4# $Id: imake.tmpl,v 1.113.2.2 2006/10/06 22:33:17 yuri Exp $
5#==================================================
6# Copyright IBM 1993
7#==================================================
8
9###################################################
10# This makefile is automatically generated by
11# imake... do not modify or you may lose your
12# changes when imake generates makefiles again.
13# Ignore this message if you are not using imake.
14###################################################
15
16RESOLVLIB =
17
18DESTDIR = $(SHARKCLONEROOT)
19TOOLDIR = /local/bin
20SHELL = /bin/sh
21CSHELL = /bin/csh
22
23IMAKE = /usr/X11R6/bin/imake
24CC=g++
25C_COMP=gcc
26
27INSTALL = /usr/bin/install
28AR = ar clq
29BARELD = ld
30KAR = ld $(LDFLAGS2) -r -o
31ARDEL = ar d
32MAKEDEPEND = g++
33CPLUSINC =
34
35LD = $(CC)
36CDEBUGFLAGS =
37
38NATIVE_CC=$(CC)
39NATIVE_C_COMP=$(C_COMP)
40NATIVE_LD=$(NATIVE_CC)
41
42PATCHED_KERNEL_FLAGS =
43
44CXI_HEADER_DIR = $(DESTDIR)/include
45
46CXI_HEADER_DIR = $(DESTDIR)/include/cxi
47
48SOURCE_CONTROL = cvs
49SRC_UPDATE_CMD = $(SOURCE_CONTROL) update -d
50SRC_CHECKIN_CMD = $(SOURCE_CONTROL) ci -a
51
52DEPENDSCRIPT = $(DESTDIR)/bin/depend.sh
53PATCHSCRIPT = $(DESTDIR)/bin/applypatch.sh
54IMAKE_DEFINES =
55
56IRULESRC = $(DESTDIR)/shark/config
57
58NIDLFLAGS = -exts C.c,S.c,W.c
59NIDLINCLUDES = $(LOCALNIDLINCLUDES)
60
61LINTOPTS = -axz
62LINTLIBFLAG = -C
63
64STD_CFLAGS =
65STD_LDFLAGS =
66STD_INCLUDES = -I$(DESTDIR)/include -I$(CXI_HEADER_DIR)
67ARFLAGS =
68KARFLAGS =
69STD_LDFLAGS = $(EXTRASTD_LDFLAGS)
70LDFLAGS2 = $(EXTRALDFLAGS2)
71
72STD_KINCLUDES = $(STD_INCLUDES)
73
74AS = as
75CPP = /lib/cpp
76LINT = lint
77RM = rm -f
78MV = mv
79CP = cp
80LN = ln -s
81RANLIB = ranlib
82RPM = rpm
83RPMBUILD = /usr/bin/rpmbuild
84
85LS = ls
86AWK = awk
87SORT = sort
88TR = tr
89MAKE = /usr/bin/make
90MAKEDASH = -
91
92SED = sed
93LEX = lex
94YACC = yacc
95BISON = bison
96NIDL = /etc/ncs/nidl $(NIDLFLAGS)
97
98MKTRACE  = $(DESTDIR)/bin/mktrace
99MERGETRC = $(DESTDIR)/bin/mergetrc
100MKTRCFMT = $(DESTDIR)/bin/mktrcfmt
101MKRPC = $(DESTDIR)/bin/mkrpc
102CHKSYSTYPES = $(SHARKCLONEROOT)/../tools/chksystypes
103
104# Ship values
105
106LPP_NAME=mmfs
107LOCAL_PROD_NAME = mmfs
108SHIP_TYPE = FILE
109SHIP_OWNER = bin
110SHIP_GROUP = system
111SHIP_CLASS = apply
112SHIP_ROOT = $(SHARKCLONEROOT)/ship
113SHIPDIR = $(SHIP_ROOT)/usr/lpp/$(LPP_NAME)
114SHIP_CMD = /usr/ucb/install -c
115
116###################################################
117# The following comes from the site.mcr
118###################################################
119
120LINUX_DISTRIBUTION = KERNEL_ORG_LINUX
121
122KERNEL_HEADER_DIR = /usr/src/linux-headers-2.6.20-15-generic/include
123
124KERNEL_BUILD_DIR = /lib/modules/2.6.20-15-generic/build
125
126LINUX_PATCH_DEFINES =
127
128CDEBUGFLAGS =
129KCDEBUGFLAGS =
130
131ARCH_DEFINES = -DGPFS_ARCH_I386 -DGPFS_LITTLE_ENDIAN
132
133COMMON_DEFINES =   -DALLOC_SUM_FILE   -DBLOCK_RESTORE   -DDESCQUORUM_OVERRIDE   -DDIO   -DDIO_XW   -DDISK_LEASE_DMS   -DDMAPI   -DDMAPI_MOVERS   -DDMAPI_PREFETCH_DIRATTRS   -DEXPORTER_EVENTS   -DFILESETS   -DFILESET_QUOTAS   -DGPFS_ERRNO_MAPPING   -DGPFS_QUOTACTL   -DLC_FENCING   -DMMAP_DIO   -DMMPMON   -DMMPMON_CUMULATIVE   -DMMPMON_DAEMON_PORT   -DMMPMON_HISTOGRAMS   -DMMPMON_NAMED_SOCKET   -DMMPMON_RPC   -DNFS_SKIP_SHRINK_TO_FIT   -DNFS4_ACL   -DNFS4_VCM   -DNO_XCLUST   -DPERF_STATS   -DPOLICY   -DPOLICY_RESTORE   -DPOOLS   -DPOW2_COND_SHIFT   -DSANERGY   -DSFS_PERF_SKIP_SYNC   -DSFS_PERF_USE_SMALL_BUFFER   -DSINGLE_PORT   -DSMB_LOCKS   -DTHREADED_RECEIVER   -DTSCOMM_SECURITY   -DUIDREMAP   -DWAIT_FOR_NSD_SERVERS
134
135COMMON_TEMPSHIP_DEFINES =   -DDBGASSERTS   -DNEW_DELETE_DEBUG    -DTRACK_USECOUNT   -DTRIGGERS   -DVERBOSETRACE
136
137COMMON_NEVERSHIP_DEFINES =   -DINSTRUMENT_LOCKS   -DPTHREAD_STATS   -DTRACE_IO_DATA   -DENTRYEXIT_TRACE
138
139SITE_OTHER_KDEFINES = -D_KERNEL -D__KERNEL__ -DMODULE                       -DGPFS_EXPORT_KSYMS -DEXPORT_SYMTAB
140
141COMMON_LINUX =   -U_GNU_SOURCE   -D__USE_BSD   -D_LARGEFILE64_SOURCE   -DGPFS_LINUX   -DYESSTR=__YESSTR   -DNOSTR=__NOSTR   -DLUM   -DNPTL   -DSSEG_SWIZZLE_PTRS   -D$(LINUX_DISTRIBUTION)   -DLINUX_DISTRIBUTION_LEVEL=90   $(LINUX_PATCH_DEFINES)
142
143EXTRASTD_LDFLAGS =
144EXTRALDFLAGS2 =
145
146SITEMCRREV_RAW = "$Revision: 1.535.2.13 $ "
147
148OPTFLAGS  = -g0 -O2 -march=i686 -fno-strict-aliasing -fno-exceptions             -DGPFS_FRAME_POINTER
149
150KOPTFLAGS = -O2 -march=i686 -fno-strict-aliasing -fno-exceptions             -fno-common -fomit-frame-pointer
151
152COMMON_26_FLAGS += -m32 -ffreestanding
153KOPTFLAGS += $(COMMON_26_FLAGS) -mpreferred-stack-boundary=2
154OPTFLAGS  += $(COMMON_26_FLAGS)
155
156KOPTFLAGS += -mregparm=3 -mpreferred-stack-boundary=2
157
158DEFAULT_DEFINES =   $(COMMON_LINUX)   -DLINUX_KERNEL_VERSION=2062015   -DLIMIT_KSTACKS   -DSSEG_RESERVE_MEM
159
160NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG
161
162SITE_FAR_TRACE_OPTS =
163
164SITE_KFAR_TRACE_OPTS = -DFAR_TRACE -DFAR_CODE -fno-defer-pop
165
166SITE_DEFINES = $(ARCH_DEFINES) $(DEFAULT_DEFINES) $(COMMON_DEFINES)
167
168###################################################
169# Back from site.mcr
170###################################################
171
172.SUFFIXES: .o .32o .64o .C .c .s .spp .y .l .idl .sh .ko .spec .po .pko .rpc
173ALL_INCLUDES = -I. $(IMAKE_INCLUDES) $(STD_INCLUDES)
174ALL_KINCLUDES = -I. $(IMAKE_INCLUDES) $(STD_KINCLUDES)
175ALL_LIBPATHS = -L. $(IMAKE_LIBS)
176IMAKE_CMD = $(IMAKE) -Timake.tmpl -I. -I$(IRULESRC) -s makefile
177DOTDOTIMAKE_CMD = $(IMAKE) -Timake.tmpl -I. -I$(IRULESRC) -s makefile
178
179ALL_DEFINES = $(IMAKE_DEFINES) $(SITE_DEFINES) $(SITE_FAR_TRACE_OPTS) $(IMAKE_DEFINES_LAST)
180ALL_KDEFINES = $(IMAKE_DEFINES) $(SITE_DEFINES) $(SITE_OTHER_KDEFINES) $(SITE_KFAR_TRACE_OPTS)
181CFLAGS = $(OPTFLAGS) $(STD_CFLAGS) $(IMAKE_CFLAGS) $(CDEBUGFLAGS) $(ALL_INCLUDES) $(ALL_DEFINES)
182NATIVECFLAGS = -O $(STD_CFLAGS) $(IMAKE_CFLAGS) $(CDEBUGFLAGS) $(ALL_INCLUDES) $(ALL_DEFINES)
183KCFLAGS = $(KOPTFLAGS) $(STD_CFLAGS) $(IMAKE_CFLAGS) $(CDEBUGFLAGS) $(ALL_KINCLUDES) $(ALL_KDEFINES)
184TESTING_CFLAGS = -DTESTINGONLYTESTING $(CFLAGS)
185
186GPL_HEADER_DIR = $(DESTDIR)/include/gpl-linux
187GPL_LIB_DIR = $(DESTDIR)/lib/gpl-linux
188
189Headers::
190  @if [ "$(LINUX_DISTRIBUTION)" = "REDHAT_LINUX" ]; then \
191    if [ ! -f /etc/redhat-release ]; then \
192      echo "Error: the current Linux environment does not agree with the setting, LINUX_DISTRIBUTION = $(LINUX_DISTRIBUTION), specified in site.mcr!"; exit 1; \
193    else \
194      rhreltype=`awk '/Enterprise/ {print "Enterprise"}' /etc/redhat-release`; \
195      if [ "$$rhreltype" = "Enterprise" ]; then \
196        echo "Error: the current Linux environment appears to be RedHat Enterprise Linux, which requires setting LINUX_DISTRIBUTION = REDHAT_AS_LINUX in site.mcr!"; exit 1; \
197      fi; \
198    fi; \
199  elif [ "$(LINUX_DISTRIBUTION)" = "REDHAT_AS_LINUX" ]; then \
200    if [ ! -f /etc/redhat-release ]; then \
201      echo "Error: the current Linux environment does not agree with the setting, LINUX_DISTRIBUTION = $(LINUX_DISTRIBUTION), specified in site.mcr!"; exit 1; \
202    else \
203      rhreltype=`awk '/Enterprise/ {print "Enterprise"}' /etc/redhat-release`; \
204      if [ "$$rhreltype" != "Enterprise" ]; then \
205        echo "Error: the current Linux environment appears to be RedHat Linux (not Enterprise Linux [AS|ES|WS] version), which requires setting LINUX_DISTRIBUTION = REDHAT_LINUX in site.mcr!"; exit 1; \
206      fi; \
207    fi; \
208  elif [ "$(LINUX_DISTRIBUTION)" = "SUSE_LINUX" ]; then \
209    if [ ! -f /etc/SuSE-release ]; then \
210      echo "Error: the current Linux environment does not agree with the setting, LINUX_DISTRIBUTION = $(LINUX_DISTRIBUTION), specified in site.mcr!"; exit 1; \
211    fi; \
212  elif [ "$(LINUX_DISTRIBUTION)" = "KERNEL_ORG_LINUX" ]; then \
213    echo "This is OK" > /dev/null; \
214  else \
215    echo "Error: LINUX_DISTRIBUTION = '$(LINUX_DISTRIBUTION)' is not a valid choice in site.mcr!"; exit 1; \
216  fi;
217
218INSTUIDFLAGS = -c -m 4555
219INSTLIBFLAGS = -c -m 0664
220INSTINCFLAGS = -c -m 0444
221INSTDOCFLAGS = -c -m 0444
222INSTROOTFLAGS = -c $(EXTRAINSTROOTFLAGS) -m 0500
223INSTROOTFLAGS2 = -c -m 0500
224INSTPROGFLAGS = -c $(EXTRAINSTPROGFLAGS) -m 0555
225INSTSHELLFLAGS = -c -m 0755
226
227DASH_I  = *-[^=\ ][i]*
228DASH_IK = *-[^=\ ][ik]*
229
230all:: libs
231All:: all
232test::
233Test:: test
234libs:: headers
235Libs:: libs
236installLibs:: trclst
237trclst::
238installLibs:: libs
239installLibs:: library.ti
240InstallLibs:: installLibs
241instLibs:: installLibs
242InstLibs:: InstallLibs
243rpm::
244
245depend:: headers
246depend:: makefile
247Depend:: depend
248install.he::
249library.ti::
250headers:: install.he
251Headers:: headers
252install.ti::
253install:: headers
254install:: libs
255install:: all
256install:: install.ti
257Install:: install
258dependInstall:: depend
259dependInstall:: install
260clean::
261Clean:: clean
262cleanTest::
263CleanTest:: cleanTest
264update:: ; $(SRC_UPDATE_CMD)
265checkin:: ; $(SRC_CHECKIN_CMD)
266Checkin:: checkin
267config1::
268config2::
269finish::
270World:: config1
271World:: Makefiles
272World:: Clean
273World:: config2
274World:: Headers
275World:: Depend
276World:: InstallLibs
277World:: Install
278World:: finish
279Ship:: shipReset
280Ship:: shipSupport
281Ship:: shipFile
282Unship:: unshipSupport
283Unship:: unshipFile
284
285shipReset::
286
287clean::
288  $(RM) #* ,* *~ *.CKP *.BAK *.bak core
289  $(RM) *.ln *.o *.32o *.64o *.po *.ko *.pko make.log *.a *.lst *.map *.so
290  $(RM) install.ti install.he library.ti *.rpm
291
292makefile:: Imakefile $(IRULESRC)/imake.tmpl $(IRULESRC)/site.mcr
293    $(IMAKE_CMD); \
294    touch .depends; \
295    cat .depends >>makefile
296
297###################################################
298# The following comes from the local Imakefile
299###################################################
300
301install.ti:: makedirs
302  @echo '\c'
303install.he:: makedirs
304  @echo '\c'
305makedirs::
306  @echo "Checking Destination Directories...."
307  @sh -c 'for i in $(CXI_HEADER_DIR);  do  \
308    if [ -f $$i ]; then  \
309      echo "Mkdir: $$i is a FILE"; \
310      exit 1; \
311    elif [ ! -d $$i ]; then  \
312      echo "Making directory $$i"; \
313      mkdir -p $$i; \
314    fi; \
315  done; \
316  exit 0'
317
318install.ti:: makedirs
319  @echo '\c'
320install.he:: makedirs
321  @echo '\c'
322makedirs::
323  @echo "Checking Destination Directories...."
324  @sh -c 'for i in $(GPL_LIB_DIR);  do  \
325    if [ -f $$i ]; then  \
326      echo "Mkdir: $$i is a FILE"; \
327      exit 1; \
328    elif [ ! -d $$i ]; then  \
329      echo "Making directory $$i"; \
330      mkdir -p $$i; \
331    fi; \
332  done; \
333  exit 0'
334
335install.he:: DirIds.h
336  @(case '$(MAKEFLAGS)' in $(DASH_I)) set +e;; esac; \
337        changed="$?"; \
338  for i in $$changed; do \
339    (set -x; $(INSTALL) $(INSTINCFLAGS) $$$(CXI_HEADER_DIR)/$$i) done)
340
341# stub for mktrace
342
343install.ti:: mktrace
344  @(case '$(MAKEFLAGS)' in $(DASH_I)) set +e;; esac; \
345        changed="$?"; \
346  for i in $$changed; do \
347    (set -x; $(INSTALL)  $(INSTSHELLFLAGS) $$$(DESTDIR)/bin/$$i) done)
348
349install.ti:: createpatch.sh
350  $(INSTALL)  $(INSTSHELLFLAGS) createpatch.sh  $(DESTDIR)/bin
351
352install.ti:: applypatch.sh
353  $(INSTALL)  $(INSTSHELLFLAGS) applypatch.sh  $(DESTDIR)/bin
354
355stubs::
356  echo "#!/bin/ksh" > mktrace
357  echo "# mktrace stub" >> mktrace
358  echo "exit 0" >> mktrace
359
360getupdatelevel.o:       getupdatelevel.c
361  $(RM) $@
362  $(CC) -c $(CFLAGS)  -I$(KERNEL_HEADER_DIR) -D__KERNEL__ $*.c
363
364all:: getupdatelevel
365getupdatelevel:  getupdatelevel.o
366  $(RM) $@
367  $(LD) -o $@  getupdatelevel.o    $(STD_LDFLAGS) $(IMAKE_LDFLAGS) $(ALL_LIBPATHS)
368clean:: ; $(RM) getupdatelevel
369
370install.ti:: getupdatelevel
371  $(INSTALL)   getupdatelevel  $(DESTDIR)/bin
372
373clean::
374  rm -f mktrace
375
376###################################################
377# Back from the local Imakefile
378###################################################
379
380Makefiles:: makefile
381
382installLibs::afterInstallLibs
383
384afterInstallLibs::
385
386shipFile shipSupport::
387
388unshipFile unshipSupport::
389
390library.ti::
391  touch library.ti
392
393install.he::
394  touch install.he
395
396install.ti::
397  touch install.ti
398
399listdirs:
400  @echo ${SUBDIRS}
401
402##### DEPENDENCY LINE - DO NOT DELETE #####
403
Note: See TracBrowser for help on using the repository browser.