# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
# 
# This software has been released under the terms of the IBM Public
# License.  For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html

srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@

# System specific build commands and flags
CC = /opt/ansic/bin/cc
DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
<hp_ux102 hp_ux110 hp_ux11i>
KOPTS=-Wp,-H200000 -Wl,-a,archive +DA1.0 +z
<ia64_hpux1122 ia64_hpux1123>
KOPTS=-Wp,-H200000 -Wl,-a,archive_shared
<all>
CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG} $(XCFLAGS)
OPTF=-O
WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD

<hp_ux102 hp_ux110 hp_ux11i>
TEST_CFLAGS= -Wp,-H200000 +DA1.0 +z -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux -DAFS_HPUX_ENV $(XCFLAGS)
<ia64_hpux1122 ia64_hpux1123>
TEST_CFLAGS= -Wp,-H200000 -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux -DAFS_HPUX_ENV
<all>
TEST_LDFLAGS=
TEST_LIBS=-lnsl -lm -lpthread -ldld -lc

LIBUAFS = libuafs.a
LIBJUAFS = libjuafs.a
LIBAFSWEB = nsafs.so
LIBAFSWEBKRB = nsafs.krb.so

include Makefile.common

$(LIBUAFS): $(UAFSOBJ)
	-$(RM) -f $(LIBUAFS)
	$(AR) $(ARFLAGS) $(LIBUAFS) $(UAFSOBJ)

libuafs_pic.a: $(PICUAFSOBJ)
	-$(RM) -f libuafs_pic.a
	$(AR) $(ARFLAGS) libuafs_pic.a $(PICUAFSOBJ)

$(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)

$(LIBAFSWEBKRB): $(AFSWEBOBJKRB) ${DES}/libdes.a
	-$(RM) -f $(LIBAFSWEBKRB)
	ld -b $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS)
