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