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:
31 # System specific build commands and flags
33 # Note: the online document
35 # Developing Dynamically Loadable Kernel Modules
40 # mentioned on http://docs.hp.com/hpux/os/index.html
41 # with URL http://docs.hp.com/hpux/content/dlkm_v1.2.pdf
43 # recommends the undocumented +ES1.Xindirect_calls option for both
44 # 32-bit and 64-bit kernel code, but it appears to be absolutely vital
45 # for compiling 64-bit kernel code. In 64-bit mode, the ANSI C compiler
46 # has the +Z (PIC) option on by default, and there is no documented way
47 # to turn it off. However, kernel code does not work properly when
48 # compiled with +Z (i.e. calling a function through a function pointer
49 # seems to hang). When the compiler sees the +ES1.Xindirect_calls
50 # option, however, it issues a warning and turns off +Z.
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
59 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS
62 CFLAGS=-I. -I.. -I../h -I../nfs -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
64 # Name of directory to hold object files and libraries.
67 # This tells Makefile.common to use its single directory build target.
68 #COMPDIRS = single_compdir
69 # This is the hpux multiple directory target.
70 COMPDIRS = hpux_compdirs
71 INSTDIRS = hpux_instdirs
72 DESTDIRS = hpux_destdirs
74 include Makefile.common
79 -$(RM) -f h net dux machine netinet nfs rpc s200 ufs sys
80 ln -fs /usr/include/sys h
81 ln -fs /etc/conf/net net
82 ln -fs /etc/conf/dux dux
83 ln -fs /etc/conf/machine machine
84 ln -fs /etc/conf/netinet netinet
85 ln -fs /etc/conf/nfs nfs
86 ln -fs /usr/include/rpc rpc
87 ln -fs /etc/conf/machine s200
88 ln -fs /etc/conf/ufs ufs
89 ln -fs /usr/include/sys sys
90 for b in $(BITS); do \
91 for t in $(KOBJ); do \
93 echo Making directory: $$dir; \
95 $(RM) -f $$dir/Makefile $$dir/Makefile.common $$dir/config; \
96 ln -fs ../Makefile $$dir/Makefile; \
97 ln -fs ../Makefile.common $$dir/Makefile.common; \
98 ln -fs ../config $$dir/config; \
103 # Compile the clients.
104 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
106 for b in $(BITS); do \
107 for t in $(KOBJ); do \
109 echo Building directory: $$dir; \
111 32) bopts="$(KDEFS_32)"; bsuff="";; \
112 64) bopts="$(KDEFS_64)"; bsuff="64";; \
115 $(MAKE) BITSUFFIX=$$bsuff CPU_KDEFS="$$bopts" $@_libafs || exit $$?; \
121 hpux_compdirs_libafs: libafs
122 hpux_instdirs_libafs: install_libafs
123 hpux_destdirs_libafs: dest_libafs
126 # Below this line are targets when in the static directory:
127 LIBAFS = libafs$(BITSUFFIX).a
128 LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
130 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
131 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
133 DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
134 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
137 libafs: ${LIBAFSNONFS}
138 install_libafs: ${INST_LIBAFSNONFS}
139 dest_libafs: ${DEST_LIBAFSNONFS}
141 $(INST_LIBAFS): $(LIBAFS)
144 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
147 $(DEST_LIBAFS): $(LIBAFS)
150 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
153 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
157 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
162 # HP specific objects
163 osi_groups.o: $(AFS)/osi_groups.c
165 osi_inode.o: $(AFS)/osi_inode.c
167 osi_file.o: $(AFS)/osi_file.c
169 osi_misc.o: $(AFS)/osi_misc.c
171 osi_sleep.o: $(AFS)/osi_sleep.c
173 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
174 $(CRULE1) -o osi_vfsops_nfs.o
175 osi_vfsops.o: $(AFS)/osi_vfsops.c
176 $(CRULE1) -DAFS_NONFSTRANS
177 osi_vm.o: $(AFS)/osi_vm.c
179 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
181 xdr_int64.o: $(RX)/xdr_int64.c
184 # This is a list of header files compiled with the -g option. It allows
185 # examination of AFS structures in a dump.
186 osi_debug.o: $(AFS)/osi_debug.c