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
8 # MakefileProto for HP systems
11 TOP_INCDIR=@TOP_INCDIR@
12 TOP_LIBDIR=@TOP_LIBDIR@
13 TOP_SRCDIR=@TOP_SRCDIR@
15 exec_prefix=@exec_prefix@
18 libexecdir=@libexecdir@
20 includedir=@includedir@
22 afssrvbindir=@afssrvbindir@
23 afssrvsbindir=@afssrvsbindir@
24 afssrvlibexecdir=@afssrvlibexecdir@
25 afskerneldir=@afskerneldir@
26 SYS_NAME=@AFS_SYSNAME@
28 include config/Makefile.${SYS_NAME}
30 # OS specific object files:
49 # System specific build commands and flags
51 # Note: the online document
53 # Developing Dynamically Loadable Kernel Modules
58 # mentioned on http://docs.hp.com/hpux/os/index.html
59 # with URL http://docs.hp.com/hpux/content/dlkm_v1.2.pdf
61 # recommends the undocumented +ES1.Xindirect_calls option for both
62 # 32-bit and 64-bit kernel code, but it appears to be absolutely vital
63 # for compiling 64-bit kernel code. In 64-bit mode, the ANSI C compiler
64 # has the +Z (PIC) option on by default, and there is no documented way
65 # to turn it off. However, kernel code does not work properly when
66 # compiled with +Z (i.e. calling a function through a function pointer
67 # seems to hang). When the compiler sees the +ES1.Xindirect_calls
68 # option, however, it issues a warning and turns off +Z.
70 KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
71 -DMP +R500 -Wl,+k $(CPU_KDEFS)
72 KDEFS_32 = +DA1.0 +DS1.0
73 # add +M2 to $(KDEFS_64) for 64-bit migration warnings
74 # warning 478: "+Z" and "+ES1.Xindirect_calls" are mutually exclusive. "+Z" ignored.
75 # warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned.
76 KDEFS_64 = +DA2.0W +DS2.0 +M2 +W 478,530
77 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS
80 CFLAGS=-I. -I.. -I../h -I../nfs -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
82 # Name of directory to hold object files and libraries.
85 # This tells Makefile.common to use its single directory build target.
86 #COMPDIRS = single_compdir
87 # This is the hpux multiple directory target.
88 COMPDIRS = hpux_compdirs
89 INSTDIRS = hpux_instdirs
90 DESTDIRS = hpux_destdirs
92 include Makefile.common
97 -$(RM) -f h net dux machine netinet nfs rpc s200 ufs sys
98 ln -s /usr/include/sys h
99 ln -s /etc/conf/net net
100 ln -s /etc/conf/dux dux
101 ln -s /etc/conf/machine machine
102 ln -s /etc/conf/netinet netinet
103 ln -s /etc/conf/nfs nfs
104 ln -s /usr/include/rpc rpc
105 ln -s /etc/conf/machine s200
106 ln -s /etc/conf/ufs ufs
107 ln -s /usr/include/sys sys
108 for b in $(BITS); do \
109 for t in $(KOBJ); do \
111 echo Making directory: $$dir; \
113 $(RM) -f $$dir/Makefile $$dir/Makefile.common $$dir/config; \
114 ln -s ../Makefile $$dir/Makefile; \
115 ln -s ../Makefile.common $$dir/Makefile.common; \
116 ln -s ../config $$dir/config; \
121 # Compile the clients.
122 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
124 for b in $(BITS); do \
125 for t in $(KOBJ); do \
127 echo Building directory: $$dir; \
129 32) bopts="$(KDEFS_32)"; bsuff="";; \
130 64) bopts="$(KDEFS_64)"; bsuff="64";; \
133 $(MAKE) BITSUFFIX=$$bsuff CPU_KDEFS="$$bopts" $@_libafs || exit $$?; \
139 hpux_compdirs_libafs: libafs
140 hpux_instdirs_libafs: install_libafs
141 hpux_destdirs_libafs: dest_libafs
144 # Below this line are targets when in the static directory:
145 LIBAFS = libafs$(BITSUFFIX).a
146 LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
148 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
149 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
151 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
152 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
155 libafs: ${LIBAFSNONFS}
156 install_libafs: ${INST_LIBAFSNONFS}
157 dest_libafs: ${DEST_LIBAFSNONFS}
159 $(INST_LIBAFS): $(LIBAFS)
162 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
165 $(DEST_LIBAFS): $(LIBAFS)
168 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
171 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
175 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
180 # HP specific objects
181 osi_groups.o: $(AFS)/osi_groups.c
183 osi_inode.o: $(AFS)/osi_inode.c
185 osi_file.o: $(AFS)/osi_file.c
187 osi_misc.o: $(AFS)/osi_misc.c
189 osi_sleep.o: $(AFS)/osi_sleep.c
191 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
192 $(CRULE1) -o osi_vfsops_nfs.o
193 osi_vfsops.o: $(AFS)/osi_vfsops.c
194 $(CRULE1) -DAFS_NONFSTRANS
195 osi_vm.o: $(AFS)/osi_vm.c
197 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
199 xdr_int64.o: $(RX)/xdr_int64.c
202 # This is a list of header files compiled with the -g option. It allows
203 # examination of AFS structures in a dump.
204 osi_debug.o: $(AFS)/osi_debug.c