fbsd-70-updates-20080115
[openafs.git] / src / libuafs / MakefileProto.LINUX.in
index 939f97c..4d2ab6f 100644 (file)
@@ -5,21 +5,29 @@
 # 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
-#
-
-DESTDIR=@DESTDIR@
-SRCDIR=@SRCDIR@
-TOP_SRCDIR=@TOP_SRCDIR@
-SYS_NAME=@AFS_SYSNAME@
-
-include ../config/Makefile.${SYS_NAME}
+srcdir=@srcdir@
+include @TOP_OBJDIR@/src/config/Makefile.config
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+# MakefileProto for LINUX systems
+# This Makefile generates two libraries: the standard libuafs and libjuafs,
+# a libuafs variant that is designed to link with Java enabled libraries.
+# The libjuafs library implements the AFS_WEB_ENHANCEMENTS definition, see
+# the libuafs README for details.
 
 # System specific build commands and flags
-CC = gcc
-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}
+SYS_NAME=@AFS_SYSNAME@
+ifeq (${SYS_NAME}, ppc64_linux26)
+CFLAGS=-fPIC
+else
+CFLAGS=
+endif
+CFLAGS+= -I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG}
 OPTF=-O
 # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
 
@@ -28,57 +36,20 @@ TEST_LDFLAGS=
 TEST_LIBS=-lpthread
 
 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
-       -ln -s /usr/include/sys h
-       -ln -s /usr/include/net net
-       -ln -s /usr/include/netinet netinet
-       -ln -s /usr/include/rpc rpc
-       -ln -s /usr/include/sys sys
-       -ln -s /usr/include/nfs nfs
-       -ln -s /usr/include/inet inet
-       -ln -s /usr/include/ufs ufs
-       -ln -s $(NS_INCL) nsapi
-
-setup_uafs: UAFS setup_common
-       -$(RM) -f UAFS/Makefile UAFS/Makefile.common
-       ln -s ../Makefile UAFS/Makefile
-       ln -s ../Makefile.common UAFS/Makefile.common
-
-UAFS:
-       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}
-
-AFSWEB/$(LIBAFSWEB): setup_nsafs
-       cd AFSWEB; \
-       $(MAKE) $(LIBAFSWEB) DESTDIR=${DESTDIR}
-
-AFSWEB/$(LIBAFSWEBKRB): setup_nsafs
-       cd AFSWEB; \
-       $(MAKE) $(LIBAFSWEBKRB) DESTDIR=${DESTDIR}
-
-# Below this line are targets when in the COMMON directory:
-
 $(LIBUAFS): $(UAFSOBJ)
        -$(RM) -f $(LIBUAFS)
        $(AR) $(ARFLAGS) $(LIBUAFS) $(UAFSOBJ)
 
+$(LIBJUAFS): $(JUAFSOBJ)
+       -$(RM) -f $(LIBJUAFS)
+       $(AR) $(ARFLAGS) $(LIBJUAFS) $(JUAFSOBJ)
+
 $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a
        -$(RM) -f $(LIBAFSWEB)
        ld -b $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS)
@@ -86,3 +57,9 @@ $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a
 $(LIBAFSWEBKRB): $(AFSWEBOBJKRB) ${DES}/libdes.a
        -$(RM) -f $(LIBAFSWEBKRB)
        ld -b $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS)
+
+
+
+
+
+