libuafs-build-juafs-everywhere-20020702
[openafs.git] / src / libuafs / MakefileProto.SOLARIS.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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10
11 # System specific build commands and flags
12 DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
13 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG}
14 OPTF=-O
15 WEBOPTS = -KPIC -I../nsapi -DNETSCAPE_NSAPI -DSOLARIS -DNET_SSL -DXP_UNIX -DMCC_HTTPD
16
17 TEST_CFLAGS=-mt -DAFS_PTHREAD_ENV -Dsolaris -DAFS_SUN5_ENV
18 TEST_LDFLAGS=
19 TEST_LIBS=-lsocket -lnsl -lthread -lm -ldl
20
21 LIBUAFS = libuafs.a
22 LIBJUAFS = libjuafs.a
23 LIBAFSWEB = nsafs.so
24 LIBAFSWEBKRB = nsafs.krb.so
25
26 include Makefile.common
27
28 setup_common:
29         -$(RM) -f  h net netinet rpc ufs nfs  machine sys inet nsapi
30         -ln -s /usr/include/sys h
31         -ln -s /usr/include/net net
32         -ln -s /usr/include/netinet netinet
33         -ln -s /usr/include/rpc rpc
34         -ln -s /usr/include/sys sys
35         -ln -s /usr/include/nfs nfs
36         -ln -s /usr/include/inet inet
37         -ln -s /usr/include/ufs ufs
38         -ln -s $(NS_INCL) nsapi
39
40 setup_uafs: UAFS setup_common
41         -$(RM) -f UAFS/Makefile UAFS/Makefile.common
42         ln -s ../Makefile UAFS/Makefile
43         ln -s ../Makefile.common UAFS/Makefile.common
44
45 setup_juafs: JUAFS setup_common
46         -$(RM) -f JUAFS/Makefile JUAFS/Makefile.common
47         ln -s ../Makefile JUAFS/Makefile
48         ln -s ../Makefile.common JUAFS/Makefile.common
49
50 UAFS:
51         mkdir -p $@
52
53 JUAFS:
54         mkdir -p $@
55
56 setup_nsafs: AFSWEB setup_common
57         -$(RM) -f AFSWEB/Makefile AFSWEB/Makefile.common
58         ln -s ../Makefile AFSWEB/Makefile
59         ln -s ../Makefile.common AFSWEB/Makefile.common
60
61 AFSWEB:
62         mkdir -p $@
63
64 UAFS/$(LIBUAFS): setup_uafs
65         cd UAFS; \
66         $(MAKE) $(LIBUAFS) LIBJUAFS_FLAGS=
67
68 JUAFS/$(LIBJUAFS): setup_juafs
69         cd JUAFS; \
70         $(MAKE) $(LIBJUAFS) DESTDIR=${DESTDIR} LIBJUAFS_FLAGS=-DAFS_WEB_ENHANCEMENTS
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)
85
86 $(LIBJUAFS): $(JUAFSOBJ)
87         -$(RM) -f $(LIBJUAFS)
88         $(AR) $(ARFLAGS) $(LIBJUAFS) $(JUAFSOBJ)
89
90 $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a
91         -$(RM) -f $(LIBAFSWEB)
92         ${LD} -G -M../mapfile -o $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS)
93
94
95 $(LIBAFSWEBKRB): $(AFSWEBOBJKRB) $(DES)/libdes.a
96         -$(RM) -f $(LIBAFSWEBKRB)
97         ${LD} -G -M../mapfile -o $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS)