# Copyright 2000, International Business Machines Corporation and others. # All Rights Reserved. # # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html srcdir=@srcdir@ include @TOP_OBJDIR@/src/config/Makefile.config # OS specific object files: AFS_OS_OBJS = \ osi_debug.o \ osi_groups.o \ osi_inode.o \ osi_file.o \ osi_misc.o \ osi_sleep.o \ osi_vnodeops.o \ osi_vm.o AFS_OS_NFSOBJS = \ osi_vfsops_nfs.o AFS_OS_NONFSOBJS = \ osi_vfsops.o # System specific build commands and flags # # Note: the online document # # Developing Dynamically Loadable Kernel Modules # Issue 1.0 # HP-UX 11.0 # October 12, 1998 # # mentioned on http://docs.hp.com/hpux/os/index.html # with URL http://docs.hp.com/hpux/content/dlkm_v1.2.pdf # # recommends the undocumented +ES1.Xindirect_calls option for both # 32-bit and 64-bit kernel code, but it appears to be absolutely vital # for compiling 64-bit kernel code. In 64-bit mode, the ANSI C compiler # has the +Z (PIC) option on by default, and there is no documented way # to turn it off. However, kernel code does not work properly when # compiled with +Z (i.e. calling a function through a function pointer # seems to hang). When the compiler sees the +ES1.Xindirect_calls # option, however, it issues a warning and turns off +Z. # KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \ -DMP +R500 -Wl,+k $(CPU_KDEFS) KDEFS_32 = +DA1.0 +DS1.0 # add +M2 to $(KDEFS_64) for 64-bit migration warnings # warning 478: "+Z" and "+ES1.Xindirect_calls" are mutually exclusive. "+Z" ignored. # warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned. KDEFS_64 = +DA2.0W +DS2.0 +M2 +W 478,530 KDEFS= +kernel -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \ -DFINE_GRAINED_PROTO_FILES \ -DMP -Wl,+k $(CPU_KDEFS) KDEFS_32 = KDEFS_64 = +DD64 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS OPTF=${OPT} OPTF2=${OPT2} CFLAGS=-I. -I.. -I../h -I../nfs -I../conf -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} # Name of directory to hold object files and libraries. KOBJ=STATIC # This is the hpux multiple directory target. COMPDIRS = hpux_compdirs INSTDIRS = hpux_instdirs DESTDIRS = hpux_destdirs include Makefile.common BITS = 64 32 BITS = 64 setup: -$(RM) -f h conf net dux machine netinet nfs rpc s200 ufs sys ln -fs /usr/include/sys h ln -fs /etc/conf/h h ln -fs /etc/conf conf ln -fs /etc/conf/net net ln -fs /etc/conf/dux dux ln -fs /etc/conf/machine machine ln -fs /etc/conf/netinet netinet ln -fs /etc/conf/nfs nfs ln -fs /usr/include/rpc rpc ln -fs /etc/conf/machine s200 ln -fs /etc/conf/ufs ufs ln -fs /etc/conf/sys ufs ln -fs /usr/include/sys sys for b in $(BITS); do \ for t in $(KOBJ); do \ dir=$$t.$$b; \ echo Making directory: $$dir; \ mkdir -p $$dir; \ $(RM) -f $$dir/Makefile $$dir/Makefile.common $$dir/config; \ ln -fs ../Makefile $$dir/Makefile; \ ln -fs ../Makefile.common $$dir/Makefile.common; \ ln -fs ../config $$dir/config; \ done; \ done echo Setup complete. # Compile the clients. ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}: if true; then \ for b in $(BITS); do \ for t in $(KOBJ); do \ dir=$$t.$$b; \ echo Building directory: $$dir; \ case $$b in \ 32) bopts="$(KDEFS_32)"; bsuff="";; \ 64) bopts="$(KDEFS_64)"; bsuff="64";; \ esac; \ cd $$dir; \ $(MAKE) BITSUFFIX=$$bsuff CPU_KDEFS="$$bopts" $@_libafs || exit $$?; \ cd ..; \ done; \ done; \ fi hpux_compdirs_libafs: depsrcs libafs hpux_instdirs_libafs: install_libafs hpux_destdirs_libafs: dest_libafs # Below this line are targets when in the static directory: LIBAFS = libafs$(BITSUFFIX).a LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS} INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS} DEST_LIBAFS = ${DEST}/root.client/usr/bin/${LIBAFS} DEST_LIBAFSNONFS = ${DEST}/root.client/usr/bin/${LIBAFSNONFS} libafs: ${LIBAFSNONFS} install_libafs: ${INST_LIBAFSNONFS} dest_libafs: ${DEST_LIBAFSNONFS} $(INST_LIBAFS): $(LIBAFS) ${INSTALL} -f $? $@ $(INST_LIBAFSNONFS): $(LIBAFSNONFS) ${INSTALL} -f $? $@ $(DEST_LIBAFS): $(LIBAFS) ${INSTALL} -f $? $@ $(DEST_LIBAFSNONFS): $(LIBAFSNONFS) ${INSTALL} -f $? $@ ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS) $(AR) cru $@ $? $(RANLIB) $@ ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS) $(AR) cru $@ $? $(RANLIB) $@