darwin-head-build-fixes-20020821
[openafs.git] / src / libuafs / MakefileProto.DARWIN.in
index 636a0a8..bca3846 100644 (file)
@@ -5,23 +5,15 @@
 # License.  For details, see the LICENSE file in the top-level source
 # directory or online at http://www.openafs.org/dl/license10.html
 
-# MakefileProto for Solaris systems
-#
+srcdir=@srcdir@
+include @TOP_OBJDIR@/src/config/Makefile.config
 
-DESTDIR=@DESTDIR@
-SRCDIR=@SRCDIR@
-TOP_SRCDIR=@TOP_SRCDIR@
-SYS_NAME=@AFS_SYSNAME@
-
-include ../config/Makefile.${SYS_NAME}
-
-MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
 
 # System specific build commands and flags
 CC = cc
-DEFINES= -D_REENTRANT -DAFSDEBUG -DKERNEL -DUKERNEL -DAFS -DVICE
+DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
 KOPTS=
-CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG} $(XCFLAGS)
+CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG} $(XCFLAGS)
 OPTF=-O
 # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
 
@@ -30,13 +22,14 @@ TEST_LDFLAGS=
 TEST_LIBS=
 
 LIBUAFS = libuafs.a
+LIBJUAFS = libjuafs.a
 LIBAFSWEB = nsafs.so
 LIBAFSWEBKRB = nsafs.krb.so
 
 include Makefile.common
 
 setup_common:
-       -rm -f  h net netinet rpc ufs nfs  machine sys inet nsapi
+       -$(RM) -f  h net netinet rpc ufs nfs  machine sys inet nsapi
        -ln -s /usr/include/sys h
        -ln -s /usr/include/net net
        -ln -s /usr/include/netinet netinet
@@ -47,23 +40,40 @@ setup_common:
        -ln -s /usr/include/ufs ufs
        -ln -s $(NS_INCL) nsapi
 
-setup_uafs: setup_common
-       set UAFS; $(MKDIR_IF_NEEDED)
-       -rm -f UAFS/Makefile UAFS/Makefile.common
+setup_uafs: UAFS setup_common
+       -$(RM) -f UAFS/Makefile UAFS/Makefile.common
        ln -s ../Makefile UAFS/Makefile
        ln -s ../Makefile.common UAFS/Makefile.common
 
-setup_nsafs: setup_common
-       set AFSWEB; $(MKDIR_IF_NEEDED)
-       -rm -f AFSWEB/Makefile AFSWEB/Makefile.common
+setup_juafs: JUAFS setup_common
+       -$(RM) -f JUAFS/Makefile JUAFS/Makefile.common
+       ln -s ../Makefile JUAFS/Makefile
+       ln -s ../Makefile.common JUAFS/Makefile.common
+
+UAFS:
+       mkdir -p $@
+
+JUAFS:
+       mkdir -p $@
+
+setup_nsafs: AFSWEB setup_common
+       -$(RM) -f AFSWEB/Makefile AFSWEB/Makefile.common
        ln -s ../Makefile AFSWEB/Makefile
        ln -s ../Makefile.common AFSWEB/Makefile.common
 
+AFSWEB:
+       mkdir -p $@
+
 UAFS/$(LIBUAFS): setup_uafs
        cd UAFS; \
-       $(MAKE) $(LIBUAFS) DESTDIR=${DESTDIR}; \
+       $(MAKE) $(LIBUAFS) DESTDIR=${DESTDIR} LIBJUAFS_FLAGS=; \
        ranlib $(LIBUAFS)
 
+JUAFS/$(LIBJUAFS): setup_juafs
+       cd JUAFS; \
+       $(MAKE) $(LIBJUAFS) DESTDIR=${DESTDIR} LIBJUAFS_FLAGS=-DAFS_WEB_ENHANCEMENTS; \
+       ranlib $(LIBJUAFS)
+
 AFSWEB/$(LIBAFSWEB): setup_nsafs
        cd AFSWEB; \
        $(MAKE) $(LIBAFSWEB) DESTDIR=${DESTDIR}
@@ -75,13 +85,17 @@ AFSWEB/$(LIBAFSWEBKRB): setup_nsafs
 # Below this line are targets when in the COMMON directory:
 
 $(LIBUAFS): $(UAFSOBJ)
-       -rm -f $(LIBUAFS)
+       -$(RM) -f $(LIBUAFS)
        $(AR) $(ARFLAGS) $(LIBUAFS) $(UAFSOBJ)
 
+$(LIBJUAFS): $(JUAFSOBJ)
+       -$(RM) -f $(LIBJUAFS)
+       $(AR) $(ARFLAGS) $(LIBJUAFS) $(JUAFSOBJ)
+
 $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a
-       -rm -f $(LIBAFSWEB)
+       -$(RM) -f $(LIBAFSWEB)
        ld -b $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS)
 
 $(LIBAFSWEBKRB): $(AFSWEBOBJKRB) ${DES}/libdes.a
-       -rm -f $(LIBAFSWEBKRB)
+       -$(RM) -f $(LIBAFSWEBKRB)
        ld -b $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS)