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 Solaris systems
12 TOP_SRCDIR=@TOP_SRCDIR@
13 SYS_NAME=@AFS_SYSNAME@
15 include config/Makefile.${SYS_NAME}
17 # OS specific object files:
33 # System specific build commands and flags
34 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
37 #LORDER = /usr/ccs/bin/lorder
38 #CC = /opt/SUNWspro/bin/cc
39 KDEFS= -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV -D_KERNEL \
40 -DSYSV -dn ${ARCH_DEFS}
47 CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
49 # Name of directory to hold object files and libraries.
50 <all -sun4x_57 -sun4x_58>
53 KOBJ = MODLOAD32 MODLOAD64
56 # This tells Makefile.common to use it's single directory build target.
57 <all -sun4x_57 -sun4x_58>
58 COMPDIRS = single_compdir
59 INSTDIRS = single_instdir
62 COMPDIRS = solaris_compdirs
63 INSTDIRS = solaris_instdirs
66 include Makefile.common
70 -$(RM) -f h net netinet rpc ufs nfs machine sys inet
71 -ln -s /usr/include/sys h
72 -ln -s /usr/include/net net
73 -ln -s /usr/include/netinet netinet
74 -ln -s /usr/include/rpc rpc
75 -ln -s /usr/include/sys sys
76 -ln -s /usr/include/nfs nfs
77 -ln -s /usr/include/inet inet
78 -ln -s /usr/include/ufs ufs
79 for t in ${KOBJ} ; do \
80 echo Making directory: $$t; \
82 $(RM) -f $$t/Makefile.common $$t/Makefile $$t/config ; \
83 ln -s ../Makefile.common $$t/Makefile.common ; \
84 ln -s ../Makefile $$t/Makefile ;\
85 ln -s ../config $$t/config ;\
89 ## This is the target for a Solaris 7. Here we build both the 32 bit and
90 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
93 ${COMPDIRS} ${INSTDIRS}:
94 for t in ${KOBJ} ; do \
95 echo Building directory: $$t ; \
98 ARCH_DEFS="${KDEFS_32}" ; \
101 ARCH_DEFS="${KDEFS_64}" ; \
107 $(MAKE) $@_libafs ; \
111 solaris_compdirs_libafs: libafs
112 solaris_instdirs_libafs: install_libafs
116 # Below this line are targets when in the COMMON directory:
118 LIBAFSNONFS = libafs.nonfs.o
120 <all -sun4x_57 -sun4x_58>
121 DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS}
122 DEST_LIBAFSNONFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
124 # Without this line, gmake tries to build libafs.o
127 # libafs: $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
128 libafs: $(LIBAFSNONFS)
129 install_libafs: $(DEST_LIBAFSNONFS)
132 $(DEST_LIBAFS): $(LIBAFS)
135 $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
139 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
141 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNFSOBJS}
143 ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
145 $(LD) -r -o $@ $(AFSAOBJS) ${AFSNONFSOBJS}
148 MODLOADDIR = ${DESTDIR}/root.client/usr/vice/etc/modload
150 libafs: ${LIBAFSNONFS}
151 install_libafs: ${LIBAFSNONFS}
152 ${INSTALL} -f ${LIBAFSNONFS} ${MODLOADDIR}/libafs${BITS}.nonfs.o
156 # Solaris specific objects
157 osi_groups.o: $(AFS)/osi_groups.c
159 osi_inode.o: $(AFS)/osi_inode.c
161 osi_file.o: $(AFS)/osi_file.c
163 osi_sleep.o: $(AFS)/osi_sleep.c
165 osi_vfsops_nfs.o: $(AFS)/osi_vfsops.c
166 $(CRULE1) -o osi_vfsops_nfs.o;
167 osi_vfsops.o: $(AFS)/osi_vfsops.c
168 $(CRULE1) -DAFS_NONFSTRANS;
169 osi_vm.o: $(AFS)/osi_vm.c
171 osi_vnodeops.o: $(AFS)/osi_vnodeops.c
173 xdr_int64.o: $(RX)/xdr_int64.c