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
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16 # OS specific object files:
22 <sunx86_511 sun4x_511>
37 # System specific build commands and flags
38 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
41 #LORDER = /usr/ccs/bin/lorder
42 #CC = /opt/SUNWspro/bin/cc
43 KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
45 <sun4x_58 sun4x_59 sun4x_510 sun4x_511>
49 <sunx86_58 sunx86_59 sunx86_510 sunx86_511>
51 KDEFS_64 = -xarch=amd64 -xmodel=kernel
54 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) @SOLARIS_CC_KOPTS@ ${DBUG}
56 <sun4x_58 sunx86_58 sun4x_59 sunx86_59>
57 LDFLAGS=-r -dy -N drv/ip -N drv/udp -N strmod/rpcmod
59 <all -sun4x_58 -sunx86_58 -sun4x_59 -sunx86_59>
60 LDFLAGS=-r -dy -N drv/ip -N drv/udp -N strmod/rpcmod -N fs/ufs
62 # Name of directory to hold object files and libraries.
63 <all -sun4x_510 sun4x_511 sunx86_511>
64 KOBJ = MODLOAD32 MODLOAD64
65 <sun4x_510 sun4x_511 sunx86_511>
68 # This tells Makefile.common to use it's single directory build target.
70 COMPDIRS = solaris_compdirs
71 INSTDIRS = solaris_instdirs
72 DESTDIRS = solaris_destdirs
74 include Makefile.common
78 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
79 -ln -fs /usr/include/sys h
80 -ln -fs /usr/include/net net
81 -ln -fs /usr/include/netinet netinet
82 -ln -fs /usr/include/rpc rpc
83 -ln -fs /usr/include/sys sys
84 -ln -fs /usr/include/nfs nfs
85 -ln -fs /usr/include/inet inet
86 -ln -fs /usr/include/ufs ufs
87 for t in ${KOBJ} ; do \
88 echo Making directory: $$t; \
90 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
91 ln -fs ../Makefile.common $$t/Makefile.common ; \
92 ln -fs ../Makefile $$t/Makefile ;\
93 ln -fs ../config $$t/config ;\
97 ## This is the target for a Solaris 7. Here we build both the 32 bit and
98 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
100 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
101 for t in ${KOBJ} ; do \
102 echo Building directory: $$t ; \
105 ARCH_DEFS="${KDEFS_32}" ; \
108 ARCH_DEFS="${KDEFS_64}" ; \
114 $(MAKE) $@_libafs || exit $$? ; \
118 solaris_compdirs_libafs: depsrcs libafs
119 solaris_instdirs_libafs: install_libafs
120 solaris_destdirs_libafs: dest_libafs
122 # Below this line are targets when in the COMMON directory:
124 LIBAFSNONFS = libafs.nonfs.o
126 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
127 INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
129 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
130 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
132 # Without this line, gmake tries to build libafs.o
135 libafs: $(LIBAFSNONFS) $(LIBAFS)
137 install_libafs: $(LIBAFS) $(LIBAFSNONFS)
138 ${INSTALL} -d ${DESTDIR}${afskerneldir}
139 ${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFS)
140 ${INSTALL} -m 644 $(LIBAFSNONFS) $(INST_LIBAFSNONFS)
142 dest_libafs: $(LIBAFS) $(LIBAFSNONFS)
143 ${INSTALL} -d ${DEST}/root.client/usr/vice/etc/modload
144 ${INSTALL} -m 644 $(LIBAFS) $(DEST_LIBAFS)
145 ${INSTALL} -m 644 $(LIBAFSNONFS) $(DEST_LIBAFSNONFS)
147 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
149 $(RUN_CTFCONVERT) libafs "${KERN_DBG}" ${AFSAOBJS} ${AFSNFSOBJS}
150 $(LD) $(LDFLAGS) -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
151 $(RUN_CTFMERGE) libafs "${KERN_DBG}" $@ $(AFSAOBJS) ${AFSNFSOBJS}
153 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
155 $(RUN_CTFCONVERT) libafs "${KERN_DBG}" ${AFSAOBJS} ${AFSNONFSOBJS}
156 $(LD) $(LDFLAGS) -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}
157 $(RUN_CTFMERGE) libafs "${KERN_DBG}" $@ $(AFSAOBJS) ${AFSNONFSOBJS}