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