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
12 # OS specific object files:
30 # System specific build commands and flags
32 # Note: the online document
34 # Developing Dynamically Loadable Kernel Modules
39 # mentioned on http://docs.hp.com/hpux/os/index.html
40 # with URL http://docs.hp.com/hpux/content/dlkm_v1.2.pdf
42 # recommends the undocumented +ES1.Xindirect_calls option for both
43 # 32-bit and 64-bit kernel code, but it appears to be absolutely vital
44 # for compiling 64-bit kernel code. In 64-bit mode, the ANSI C compiler
45 # has the +Z (PIC) option on by default, and there is no documented way
46 # to turn it off. However, kernel code does not work properly when
47 # compiled with +Z (i.e. calling a function through a function pointer
48 # seems to hang). When the compiler sees the +ES1.Xindirect_calls
49 # option, however, it issues a warning and turns off +Z.
51 KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
52 -DMP +R500 -Wl,+k $(CPU_KDEFS)
53 KDEFS_32 = +DA1.0 +DS1.0
54 # add +M2 to $(KDEFS_64) for 64-bit migration warnings
55 # warning 478: "+Z" and "+ES1.Xindirect_calls" are mutually exclusive. "+Z" ignored.
56 # warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned.
57 KDEFS_64 = +DA2.0W +DS2.0 +M2 +W 478,530
58 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS
61 CFLAGS=-I. -I.. -I../h -I../nfs -I../conf -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
63 # Name of directory to hold object files and libraries.
66 # This is the hpux multiple directory target.
67 COMPDIRS = hpux_compdirs
68 INSTDIRS = hpux_instdirs
69 DESTDIRS = hpux_destdirs
71 include Makefile.common
76 -$(RM) -f h conf net dux machine netinet nfs rpc s200 ufs sys
77 ln -fs /usr/include/sys h
79 ln -fs /etc/conf/net net
80 ln -fs /etc/conf/dux dux
81 ln -fs /etc/conf/machine machine
82 ln -fs /etc/conf/netinet netinet
83 ln -fs /etc/conf/nfs nfs
84 ln -fs /usr/include/rpc rpc
85 ln -fs /etc/conf/machine s200
86 ln -fs /etc/conf/ufs ufs
87 ln -fs /usr/include/sys sys
88 for b in $(BITS); do \
89 for t in $(KOBJ); do \
91 echo Making directory: $$dir; \
93 $(RM) -f $$dir/Makefile $$dir/Makefile.common $$dir/config; \
94 ln -fs ../Makefile $$dir/Makefile; \
95 ln -fs ../Makefile.common $$dir/Makefile.common; \
96 ln -fs ../config $$dir/config; \
101 # Compile the clients.
102 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
104 for b in $(BITS); do \
105 for t in $(KOBJ); do \
107 echo Building directory: $$dir; \
109 32) bopts="$(KDEFS_32)"; bsuff="";; \
110 64) bopts="$(KDEFS_64)"; bsuff="64";; \
113 $(MAKE) BITSUFFIX=$$bsuff CPU_KDEFS="$$bopts" $@_libafs || exit $$?; \
119 hpux_compdirs_libafs: depsrcs libafs
120 hpux_instdirs_libafs: install_libafs
121 hpux_destdirs_libafs: dest_libafs
124 # Below this line are targets when in the static directory:
125 LIBAFS = libafs$(BITSUFFIX).a
126 LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
128 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
129 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
131 DEST_LIBAFS = ${DEST}/root.client/usr/bin/${LIBAFS}
132 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/bin/${LIBAFSNONFS}
135 libafs: ${LIBAFSNONFS}
136 install_libafs: ${INST_LIBAFSNONFS}
137 dest_libafs: ${DEST_LIBAFSNONFS}
139 $(INST_LIBAFS): $(LIBAFS)
142 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
145 $(DEST_LIBAFS): $(LIBAFS)
148 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
151 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
155 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)