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:
27 # System specific build commands and flags
28 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
31 #LORDER = /usr/ccs/bin/lorder
32 #CC = /opt/SUNWspro/bin/cc
33 KDEFS= -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV -D_KERNEL \
34 -DSYSV -dn ${ARCH_DEFS}
36 <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
41 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
43 # Name of directory to hold object files and libraries.
44 <all -sun4x_57 -sun4x_58 -sun4x_59 -sunx86_57 -sunx86_58 -sunx86_59>
46 <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
47 KOBJ = MODLOAD32 MODLOAD64
50 # This tells Makefile.common to use it's single directory build target.
51 <all -sun4x_57 -sun4x_58 -sun4x_59 -sunx86_57 -sunx86_58 -sunx86_59>
52 COMPDIRS = single_compdir
53 INSTDIRS = single_instdir
54 DESTDIRS = single_destdir
56 <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
57 COMPDIRS = solaris_compdirs
58 INSTDIRS = solaris_instdirs
59 DESTDIRS = solaris_destdirs
62 include Makefile.common
66 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
67 -ln -fs /usr/include/sys h
68 -ln -fs /usr/include/net net
69 -ln -fs /usr/include/netinet netinet
70 -ln -fs /usr/include/rpc rpc
71 -ln -fs /usr/include/sys sys
72 -ln -fs /usr/include/nfs nfs
73 -ln -fs /usr/include/inet inet
74 -ln -fs /usr/include/ufs ufs
75 for t in ${KOBJ} ; do \
76 echo Making directory: $$t; \
78 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
79 ln -fs ../Makefile.common $$t/Makefile.common ; \
80 ln -fs ../Makefile $$t/Makefile ;\
81 ln -fs ../config $$t/config ;\
85 ## This is the target for a Solaris 7. Here we build both the 32 bit and
86 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
88 <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
89 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
90 for t in ${KOBJ} ; do \
91 echo Building directory: $$t ; \
94 ARCH_DEFS="${KDEFS_32}" ; \
97 ARCH_DEFS="${KDEFS_64}" ; \
103 $(MAKE) $@_libafs ; \
107 solaris_compdirs_libafs: depsrcs libafs
108 solaris_instdirs_libafs: install_libafs
109 solaris_destdirs_libafs: dest_libafs
113 # Below this line are targets when in the COMMON directory:
115 LIBAFSNONFS = libafs.nonfs.o
117 <all -sun4x_57 -sun4x_58 -sun4x_59>
118 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
119 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
121 DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
122 DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
124 <sun4x_57 sun4x_58 sun4x_59>
126 libafs: ${LIBAFSNONFS} ${LIBAFS}
128 install_libafs: ${LIBAFSNONFS} ${LIBAFS}
129 ${INSTALL} -f ${LIBAFSNONFS} ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
130 ${INSTALL} -f ${LIBAFS} ${DESTDIR}${afskerneldir}/libafs${BITS}.o
132 dest_libafs: ${LIBAFSNONFS} ${LIBAFS}
133 ${INSTALL} -f ${LIBAFSNONFS} ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.nonfs.o
134 ${INSTALL} -f ${LIBAFS} ${DEST}/root.client/usr/vice/etc/modload/libafs${BITS}.o
138 # Without this line, gmake tries to build libafs.o
141 libafs: $(LIBAFSNONFS) $(LIBAFS)
142 install_libafs: $(INST_LIBAFSNONFS) $(INST_LIBAFS)
143 dest_libafs: $(DEST_LIBAFSNONFS) $(DEST_LIBAFS)
146 $(INST_LIBAFS): $(LIBAFS)
149 $(INST_LIBAFSNONFS): $(LIBAFSNONFS)
152 $(DEST_LIBAFS): $(LIBAFS)
155 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
158 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
160 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
162 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
164 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}