1 # Copyright 2000, International Business Machines Corporation and others.
4 # This software has been released under the terms of the IBM Public
5 # License. For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
9 include @TOP_OBJDIR@/src/config/Makefile.config
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16 # OS specific object files:
28 <ia64_hpux1123 hp_ux1123>
29 hpux_mod_nfs.modmeta.o \
34 <ia64_hpux1123 hp_ux1123>
40 # System specific build commands and flags
42 # Note: the online document
44 # Developing Dynamically Loadable Kernel Modules
49 # mentioned on http://docs.hp.com/hpux/os/index.html
50 # with URL http://docs.hp.com/hpux/content/dlkm_v1.2.pdf
52 # recommends the undocumented +ES1.Xindirect_calls option for both
53 # 32-bit and 64-bit kernel code, but it appears to be absolutely vital
54 # for compiling 64-bit kernel code. In 64-bit mode, the ANSI C compiler
55 # has the +Z (PIC) option on by default, and there is no documented way
56 # to turn it off. However, kernel code does not work properly when
57 # compiled with +Z (i.e. calling a function through a function pointer
58 # seems to hang). When the compiler sees the +ES1.Xindirect_calls
59 # option, however, it issues a warning and turns off +Z.
61 # for 11.23, see the DDK BE/Sample_makefiles/Makefile.bld
64 # 11.23 uses new compiler, with new options. The same compiler is on pa_risc and ia64
66 <hp_ux110 hp_ux102 hp_ux11i>
67 KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
68 -DMP +R500 -Wl,+k $(CPU_KDEFS)
69 KDEFS_32 = +DA1.0 +DS1.0
70 # add +M2 to $(KDEFS_64) for 64-bit migration warnings
71 # warning 478: "+Z" and "+ES1.Xindirect_calls" are mutually exclusive. "+Z" ignored.
72 # warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned.
73 KDEFS_64 = +DA2.0W +DS2.0 +M2 +W 478,530
78 KDEFS= +kernel -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
79 -DFINE_GRAINED_PROTO_FILES \
80 -DMP -Wl,+k $(CPU_KDEFS)
90 <ia64_hpux1123 hp_ux1123>
92 CCOPTS_common= -Ae +DD64 +O2
94 IDENTS_common= -DACLS -DAUDIT -DHPONCPLUS -DIDDS -DIPSEC -DIVT_INTERCEPT \
95 -DLWSYSCALL -DPGPROF -DSTCP -D_CLEAN_BE -D_HPUX_SOURCE -D_KERNEL \
96 -D_LARGEFILE64_SOURCE -D_NO_USER_PROTOS -D_UNSUPPORTED \
97 -D__BIGMSGQUEUE_ENABLED -D__ROSE__ -U__hp9000s700 \
98 -D_XPG4_EXTENDED -D__STDC_EXT__
100 # Definitions which apply to IPF only
102 CCOPTS_ipf= +DSitanium2 +kernel +objstatvars +Olit=all +Oshortdata=0 +W863
104 IDENTS_ipf= -DKERNEL_DEBUGGER -DVARIABLE_UAREA -D_SYSCALL_64 -D__NO_PA_HDRS
106 LDOPTS_ipf= +noobjdebug
108 # Definitions which apply to PA only
110 CCOPTS_pa= +DS2.0 +ES1.Xindirect_calls +ESlit +ESsfc +ESssf \
111 +ordering_unaware +Oentrysched +Ofastaccess +Omultiprocessor \
114 IDENTS_pa= -DCOMB_FLIPPER -DKGDB_ON -DLP64_TMP_NODBG -DNEW_MFCTL_W \
115 -DNEW_RDB -DPARISC -DRDB -DSPP_OBP_BOOT -DSPP_RUNWAY_ERR_ENABLED \
116 -D__NO_EM_HDRS -D__ROSEVILLE__ -D__TEMP64__ -D__hp9000s800
121 # above from the Makefile.bld example
123 LDOPTS= ${LDOPTS_${ARCH}}
124 KDEFS= $(CCOPTS_common) $(IDENTS_common) $(CPU_KDEFS)
125 KDEFS_64= ${CCOPTS_${ARCH}} ${IDENTS_${ARCH}}
127 MODLINK=/opt/ddk/11.23/BE/bin/modlink
128 MODMETA=/opt/ddk/11.23/BE/bin/modmeta
132 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS
135 CFLAGS=-I. -I.. -I../h -I../nfs -I../conf -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
137 # Name of directory to hold object files and libraries.
140 # This is the hpux multiple directory target.
141 COMPDIRS = hpux_compdirs
142 INSTDIRS = hpux_instdirs
143 DESTDIRS = hpux_destdirs
145 include Makefile.common
147 <hp_ux11i hp_ux110 hp_ux102>
149 <ia64_hpux1122 ia64_hpux1123 hp_ux1123>
154 -$(RM) -f h conf net dux machine netinet nfs rpc s200 ufs sys
156 ln -fs /usr/include/sys h
157 <hp_ux110 hp_ux11i ia64_hpux1122>
159 <hp_ux102 hp_ux110 hp_ux11i ia64_hpux1122>
160 ln -fs /etc/conf conf
161 ln -fs /etc/conf/net net
162 ln -fs /etc/conf/dux dux
163 ln -fs /etc/conf/machine machine
164 ln -fs /etc/conf/netinet netinet
165 ln -fs /etc/conf/nfs nfs
166 ln -fs /usr/include/rpc rpc
167 ln -fs /etc/conf/machine s200
168 <hp_ux11i hp_ux110 hp_ux102>
169 ln -fs /etc/conf/ufs ufs
171 ln -fs /etc/conf/sys ufs
172 <ia64_hpux1123 hp_ux1123>
173 ln -fs /usr/include/sys h
174 ln -fs /usr/include/net net
175 ln -fs /usr/include/netinet netinet
176 ln -fs /usr/include/nfs nfs
177 ln -fs /usr/include/rpc rpc
178 ln -fs /usr/include/sys ufs
180 ln -fs /usr/include/sys sys
181 for b in $(BITS); do \
182 for t in $(KOBJ); do \
184 echo Making directory: $$dir; \
186 $(RM) -f $$dir/Makefile $$dir/Makefile.common $$dir/config; \
187 ln -fs ../Makefile $$dir/Makefile; \
188 ln -fs ../Makefile.common $$dir/Makefile.common; \
189 ln -fs ../config $$dir/config; \
194 # Compile the clients.
195 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
197 for b in $(BITS); do \
198 for t in $(KOBJ); do \
200 echo Building directory: $$dir; \
202 32) bopts="$(KDEFS_32)"; bsuff="";; \
203 64) bopts="$(KDEFS_64)"; bsuff="64";; \
205 $(MAKE) BITSUFFIX=$$bsuff CPU_KDEFS="$$bopts" SUBDIR=$$dir $@_libafs || exit $$?; \
210 hpux_compdirs_libafs:
214 $(MAKE) libafs || exit $$?; \
218 hpux_instdirs_libafs: install_libafs
219 hpux_destdirs_libafs: dest_libafs
222 # Below this line are targets when in the static directory:
223 <all -ia64_hpux1123 -hp_ux1123>
224 LIBAFS = libafs$(BITSUFFIX).a
225 LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
226 <ia64_hpux1123 hp_ux1123>
227 LIBAFS = afs$(BITSUFFIX)_nfs
228 LIBAFSNONFS =afs$(BITSUFFIX)
231 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
232 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
234 DEST_LIBAFS = ${DEST}/root.client/usr/bin/${LIBAFS}
235 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/bin/${LIBAFSNONFS}
238 libafs: ${LIBAFSNONFS}
240 install_libafs: $(LIBAFSNONFS)
241 ${INSTALL} -d ${DESTDIR}${afskerneldir}
242 ${INSTALL} -m 644 $(SUBDIR)/$(LIBAFSNONFS) $(INST_LIBAFSNONFS)
244 dest_libafs: $(LIBAFSNONFS)
245 ${INSTALL} -d ${DEST}/root.client/usr/bin
246 ${INSTALL} -m 644 $(SUBDIR)/$(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
248 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
249 <all -ia64_hpux1123 -hp_ux1123>
252 <ia64_hpux1123 hp_ux1123>
253 $(MODLINK) -o $@ $(AFSAOBJS) $(AFSNFSOBJS)
256 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
257 <all -ia64_hpux1123 -hp_ux1123>
260 <ia64_hpux1123 hp_ux1123>
261 $(MODLINK) -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
264 <ia64_hpux1123 hp_ux1123>
265 hpux_mod.modmeta.c: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta
266 $(MODMETA) ${IDENTS_common} ${IDENTS_ipf} \
267 -DAFSLIB_NAME=${LIBAFSNONFS} \
268 $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta > hpux_mod.modmeta.c
270 hpux_mod_nfs.modmeta.c: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta
271 $(MODMETA) ${IDENTS_common} ${IDENTS_ipf} \
272 -DAFSLIB_NAME=${LIBAFS} \
273 $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta > hpux_mod_nfs.modmeta.c