initial-objdir-support-20011017
[openafs.git] / src / libuafs / MakefileProto.FBSD.in
1 #/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
2
3 # MakefileProto for Solaris systems
4 #
5 DEST=@DEST@
6 TOP_SRCDIR=@TOP_SRCDIR@
7 TOP_INCDIR=@TOP_INCDIR@
8 TOP_LIBDIR=@TOP_LIBDIR@
9 TOP_OBJDIR=@TOP_OBJDIR@
10 srcdir=@srcdir@
11 VPATH=${srcdir}
12 prefix=@prefix@
13 exec_prefix=@exec_prefix@
14 bindir=@bindir@
15 sbindir=@sbindir@
16 libexecdir=@libexecdir@
17 libdir=@libdir@
18 includedir=@includedir@
19 mandir=@mandir@
20 afssrvbindir=@afssrvbindir@
21 afssrvsbindir=@afssrvsbindir@
22 afssrvlibexecdir=@afssrvlibexecdir@
23 SYS_NAME=@AFS_SYSNAME@
24
25 include ../config/Makefile.${SYS_NAME}
26
27 # System specific build commands and flags
28 CC = gcc
29 DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
30 KOPTS=
31 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG}
32 OPTF=-O
33 # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
34
35 TEST_CFLAGS=-pthread -D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_FBSD40_ENV
36 TEST_LDFLAGS=
37 TEST_LIBS=
38
39 LIBUAFS = libuafs.a
40 LIBAFSWEB = nsafs.so
41 LIBAFSWEBKRB = nsafs.krb.so
42
43 include Makefile.common
44
45 setup_common:
46         -$(RM) -f  h net netinet rpc ufs nfs  machine sys inet nsapi
47         -ln -s /usr/include/sys h
48         -ln -s /usr/include/net net
49         -ln -s /usr/include/netinet netinet
50         -ln -s /usr/include/rpc rpc
51         -ln -s /usr/include/sys sys
52         -ln -s /usr/include/nfs nfs
53         -ln -s /usr/include/inet inet
54         -ln -s /usr/include/ufs ufs
55         -ln -s $(NS_INCL) nsapi
56
57 setup_uafs: UAFS setup_common
58         -$(RM) -f UAFS/Makefile UAFS/Makefile.common
59         ln -s ../Makefile UAFS/Makefile
60         ln -s ../Makefile.common UAFS/Makefile.common
61
62 UAFS:
63         mkdir -p $@
64
65 setup_nsafs: AFSWEB setup_common
66         -$(RM) -f AFSWEB/Makefile AFSWEB/Makefile.common
67         ln -s ../Makefile AFSWEB/Makefile
68         ln -s ../Makefile.common AFSWEB/Makefile.common
69
70 AFSWEB: 
71         mkdir -p $@
72
73 UAFS/$(LIBUAFS): setup_uafs
74         cd UAFS; \
75         $(MAKE) $(LIBUAFS) DESTDIR=${DESTDIR}
76
77 AFSWEB/$(LIBAFSWEB): setup_nsafs
78 cd AFSWEB; \
79         $(MAKE) $(LIBAFSWEB) DESTDIR=${DESTDIR}
80
81 AFSWEB/$(LIBAFSWEBKRB): setup_nsafs
82         cd AFSWEB; \
83         $(MAKE) $(LIBAFSWEBKRB) DESTDIR=${DESTDIR}
84
85 # Below this line are targets when in the COMMON directory:
86
87 $(LIBUAFS): $(UAFSOBJ)
88         -$(RM) -f $(LIBUAFS)
89         $(AR) $(ARFLAGS) $(LIBUAFS) $(UAFSOBJ)
90
91 $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a
92         -$(RM) -f $(LIBAFSWEB)
93         ld -b $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS)
94
95 $(LIBAFSWEBKRB): $(AFSWEBOBJKRB) ${DES}/libdes.a
96         -$(RM) -f $(LIBAFSWEBKRB)
97         ld -b $(LIBAFSWEBKRB) $(AFSWEBOBJKRB) ${DES}/libdes.a $(WEBLIBS)