ad19125c8bede4a2d0c359638fd194a88c7d308c
[openafs.git] / src / libuafs / MakefileProto.AIX.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
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
7
8 # MakefileProto for AIX systems
9 #
10
11 DESTDIR=@DESTDIR@
12 SRCDIR=@SRCDIR@
13 TOP_SRCDIR=@TOP_SRCDIR@
14 SYS_NAME=@AFS_SYSNAME@
15
16 include ../config/Makefile.${SYS_NAME}
17
18 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
19
20 # System specific build commands and flags
21 DEFINES= -DAFSDEBUG -DKERNEL -DUKERNEL -DAFS -DVICE
22 CFLAGS=-I. -I.. -I${TOP_SRCDIR}/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG}
23 AR = /usr/bin/ar
24 ARFLAGS = -r
25 RANLIB = /bin/ranlib
26 CC = xlc_r
27 DEF_LIBPATH=/usr/lib/threads:/usr/lib:/lib
28 EXPFILE=../nsafslib.exp 
29 LD_FLAGS=-bM:SRE -bE:$(EXPFILE) -berok -bnoentry -blibpath:$(DEF_LIBPATH)
30
31 TEST_CFLAGS=-DAFS_PTHREAD_ENV -Daix -DAFS_AIX_ENV
32 TEST_LDFLAGS=
33 TEST_LIBS=-lm -lpthreads
34
35 LIBUAFS = libuafs.a
36 LIBAFSWEB = nsafs.a
37 LIBAFSWEBKRB = nsafs.krb.a
38
39 OPTF=-O
40 WEBOPTS = -I../nsapi -qarch=com -DNETSCAPE_NSAPI -DAIX -DNET_SSL -DXP_UNIX -DMCC_HTTPD
41
42 include Makefile.common
43
44 setup_common:
45         -rm -f  h net netinet rpc ufs nfs  machine sys inet nsapi
46         -ln -s /usr/include/sys h
47         -ln -s /usr/include/net net
48         -ln -s /usr/include/netinet netinet
49         -ln -s /usr/include/rpc rpc
50         -ln -s /usr/include/sys sys
51         -ln -s /usr/include/nfs nfs
52         -ln -s /usr/include/inet inet
53         -ln -s /usr/include/ufs ufs
54         -ln -s $(NS_INCL) nsapi
55
56 setup_uafs: setup_common
57         set UAFS; $(MKDIR_IF_NEEDED)
58         -rm -f UAFS/Makefile UAFS/Makefile.common
59         ln -s ../Makefile UAFS/Makefile
60         ln -s ../Makefile.common UAFS/Makefile.common
61
62 setup_nsafs: setup_common
63         set AFSWEB; $(MKDIR_IF_NEEDED)
64         -rm -f AFSWEB/Makefile AFSWEB/Makefile.common
65         ln -s ../Makefile AFSWEB/Makefile
66         ln -s ../Makefile.common AFSWEB/Makefile.common
67
68 UAFS/$(LIBUAFS): setup_uafs
69         cd UAFS; \
70         $(MAKE) $(LIBUAFS)
71
72 AFSWEB/$(LIBAFSWEB): setup_nsafs
73         cd AFSWEB; \
74         $(MAKE) $(LIBAFSWEB)
75
76 AFSWEB/$(LIBAFSWEBKRB): setup_nsafs
77         cd AFSWEB; \
78         $(MAKE) $(LIBAFSWEBKRB)
79
80 # Below this line are targets when in the COMMON directory:
81
82 $(LIBUAFS): $(UAFSOBJ)
83         -rm -f $(LIBUAFS)
84         $(AR) $(ARFLAGS) $(LIBUAFS) $(UAFSOBJ) $(AFS)/afsl.exp
85         $(RANLIB) libuafs.a
86
87 $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a ${DESTDIR}/lib/afs/libsys.a
88         -rm -f $(LIBAFSWEB)
89         ld -o $(LIBAFSWEB) $(LD_FLAGS) $(AFSWEBOBJ) ${DES}/libdes.a ${DESTDIR}/lib/afs/libsys.a -lm -lc
90
91 ##
92 ## Use Kerberos authentication instead of kaservers
93 ##
94 $(LIBAFSWEBKRB): $(AFSWEBOBJKRB) ${DES}/libdes.a ${DESTDIR}/lib/afs/libsys.a 
95         -rm -f $(LIBAFSWEBKRB)
96         ld -o $(LIBAFSWEBKRB) $(LD_FLAGS) $(AFSWEBOBJKRB) ${DES}/libdes.a ${DESTDIR}/lib/afs/libsys.a -lm -lc