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