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@
14 TOP_OBJDIR=@TOP_OBJDIR@
18 exec_prefix=@exec_prefix@
21 libexecdir=@libexecdir@
23 includedir=@includedir@
25 afssrvbindir=@afssrvbindir@
26 afssrvsbindir=@afssrvsbindir@
27 afssrvlibexecdir=@afssrvlibexecdir@
28 afskerneldir=@afskerneldir@
29 SYS_NAME=@AFS_SYSNAME@
31 include config/Makefile.${SYS_NAME}
33 # OS specific object files:
52 # System specific build commands and flags
54 # Note: the online document
56 # Developing Dynamically Loadable Kernel Modules
61 # mentioned on http://docs.hp.com/hpux/os/index.html
62 # with URL http://docs.hp.com/hpux/content/dlkm_v1.2.pdf
64 # recommends the undocumented +ES1.Xindirect_calls option for both
65 # 32-bit and 64-bit kernel code, but it appears to be absolutely vital
66 # for compiling 64-bit kernel code. In 64-bit mode, the ANSI C compiler
67 # has the +Z (PIC) option on by default, and there is no documented way
68 # to turn it off. However, kernel code does not work properly when
69 # compiled with +Z (i.e. calling a function through a function pointer
70 # seems to hang). When the compiler sees the +ES1.Xindirect_calls
71 # option, however, it issues a warning and turns off +Z.
73 KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
74 -DMP +R500 -Wl,+k $(CPU_KDEFS)
75 KDEFS_32 = +DA1.0 +DS1.0
76 # add +M2 to $(KDEFS_64) for 64-bit migration warnings
77 # warning 478: "+Z" and "+ES1.Xindirect_calls" are mutually exclusive. "+Z" ignored.
78 # warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned.
79 KDEFS_64 = +DA2.0W +DS2.0 +M2 +W 478,530
80 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS
83 CFLAGS=-I. -I.. -I../h -I../nfs -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
85 # Name of directory to hold object files and libraries.
88 # This tells Makefile.common to use its single directory build target.
89 #COMPDIRS = single_compdir
90 # This is the hpux multiple directory target.
91 COMPDIRS = hpux_compdirs
92 INSTDIRS = hpux_instdirs
93 DESTDIRS = hpux_destdirs
95 include Makefile.common
100 -$(RM) -f h net dux machine netinet nfs rpc s200 ufs sys
101 ln -fs /usr/include/sys h
102 ln -fs /etc/conf/net net
103 ln -fs /etc/conf/dux dux
104 ln -fs /etc/conf/machine machine
105 ln -fs /etc/conf/netinet netinet
106 ln -fs /etc/conf/nfs nfs
107 ln -fs /usr/include/rpc rpc
108 ln -fs /etc/conf/machine s200
109 ln -fs /etc/conf/ufs ufs
110 ln -fs /usr/include/sys sys
111 for b in $(BITS); do \
112 for t in $(KOBJ); do \
114 echo Making directory: $$dir; \
116 $(RM) -f $$dir/Makefile $$dir/Makefile.common $$dir/config; \
117 ln -fs ../Makefile $$dir/Makefile; \
118 ln -fs ../Makefile.common $$dir/Makefile.common; \
119 ln -fs ../config $$dir/config; \
124 # Compile the clients.
125 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
127 for b in $(BITS); do \
128 for t in $(KOBJ); do \
130 echo Building directory: $$dir; \
132 32) bopts="$(KDEFS_32)"; bsuff="";; \
133 64) bopts="$(KDEFS_64)"; bsuff="64";; \
136 $(MAKE) BITSUFFIX=$$bsuff CPU_KDEFS="$$bopts" $@_libafs || exit $$?; \
142 hpux_compdirs_libafs: libafs
143 hpux_instdirs_libafs: install_libafs
144 hpux_destdirs_libafs: dest_libafs
147 # Below this line are targets when in the static directory:
148 LIBAFS = libafs$(BITSUFFIX).a
149 LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
151 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
152 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
154 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
155 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
158 libafs: ${LIBAFSNONFS}
159 install_libafs: ${INST_LIBAFSNONFS}
160 dest_libafs: ${DEST_LIBAFSNONFS}
162 $(INST_LIBAFS): $(LIBAFS)
165 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
168 $(DEST_LIBAFS): $(LIBAFS)
171 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
174 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
178 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
183 # HP specific objects
184 osi_groups.o: $(AFS)/osi_groups.c
186 osi_inode.o: $(AFS)/osi_inode.c
188 osi_file.o: $(AFS)/osi_file.c
190 osi_misc.o: $(AFS)/osi_misc.c
192 osi_sleep.o: $(AFS)/osi_sleep.c
194 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
195 $(CRULE1) -o osi_vfsops_nfs.o
196 osi_vfsops.o: $(AFS)/osi_vfsops.c
197 $(CRULE1) -DAFS_NONFSTRANS
198 osi_vm.o: $(AFS)/osi_vm.c
200 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
202 xdr_int64.o: $(RX)/xdr_int64.c
205 # This is a list of header files compiled with the -g option. It allows
206 # examination of AFS structures in a dump.
207 osi_debug.o: $(AFS)/osi_debug.c