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 <hp_ux110 hp_ux102 hp_ux11i>
52 KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
53 -DMP +R500 -Wl,+k $(CPU_KDEFS)
54 KDEFS_32 = +DA1.0 +DS1.0
55 # add +M2 to $(KDEFS_64) for 64-bit migration warnings
56 # warning 478: "+Z" and "+ES1.Xindirect_calls" are mutually exclusive. "+Z" ignored.
57 # warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned.
58 KDEFS_64 = +DA2.0W +DS2.0 +M2 +W 478,530
63 KDEFS= +kernel -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
64 -DFINE_GRAINED_PROTO_FILES \
65 -DMP -Wl,+k $(CPU_KDEFS)
71 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS
74 CFLAGS=-I. -I.. -I../h -I../nfs -I../conf -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
76 # Name of directory to hold object files and libraries.
79 # This is the hpux multiple directory target.
80 COMPDIRS = hpux_compdirs
81 INSTDIRS = hpux_instdirs
82 DESTDIRS = hpux_destdirs
84 include Makefile.common
86 <hp_ux11i hp_ux110 hp_ux102>
93 -$(RM) -f h conf net dux machine netinet nfs rpc s200 ufs sys
95 ln -fs /usr/include/sys h
96 <hp_ux110 hp_ux11i ia64_hpux1122>
100 ln -fs /etc/conf/net net
101 ln -fs /etc/conf/dux dux
102 ln -fs /etc/conf/machine machine
103 ln -fs /etc/conf/netinet netinet
104 ln -fs /etc/conf/nfs nfs
105 ln -fs /usr/include/rpc rpc
106 ln -fs /etc/conf/machine s200
107 <hp_ux11i hp_ux110 hp_ux102>
108 ln -fs /etc/conf/ufs ufs
110 ln -fs /etc/conf/sys ufs
112 ln -fs /usr/include/sys sys
113 for b in $(BITS); do \
114 for t in $(KOBJ); do \
116 echo Making directory: $$dir; \
118 $(RM) -f $$dir/Makefile $$dir/Makefile.common $$dir/config; \
119 ln -fs ../Makefile $$dir/Makefile; \
120 ln -fs ../Makefile.common $$dir/Makefile.common; \
121 ln -fs ../config $$dir/config; \
126 # Compile the clients.
127 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
129 for b in $(BITS); do \
130 for t in $(KOBJ); do \
132 echo Building directory: $$dir; \
134 32) bopts="$(KDEFS_32)"; bsuff="";; \
135 64) bopts="$(KDEFS_64)"; bsuff="64";; \
138 $(MAKE) BITSUFFIX=$$bsuff CPU_KDEFS="$$bopts" $@_libafs || exit $$?; \
144 hpux_compdirs_libafs: depsrcs libafs
145 hpux_instdirs_libafs: install_libafs
146 hpux_destdirs_libafs: dest_libafs
149 # Below this line are targets when in the static directory:
150 LIBAFS = libafs$(BITSUFFIX).a
151 LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
153 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
154 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
156 DEST_LIBAFS = ${DEST}/root.client/usr/bin/${LIBAFS}
157 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/bin/${LIBAFSNONFS}
160 libafs: ${LIBAFSNONFS}
161 install_libafs: ${INST_LIBAFSNONFS}
162 dest_libafs: ${DEST_LIBAFSNONFS}
164 $(INST_LIBAFS): $(LIBAFS)
167 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
170 $(DEST_LIBAFS): $(LIBAFS)
173 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
176 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
180 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)