BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / tests / nfs / unix-tests / Makefile
CommitLineData
1c15e888
C
1#
2# @(#)Makefile 1.5 90/01/10 NFS Rev 2 Testsuite
3#
4# 'make all' makes test programs
5# 'make clean' cleans directories
6# 'make copy DESTDIR=path' copies test programs to path
7# 'make dist DESTDIR=path' copies sources to path
8
9MAKE=make
10DESTDIR=/no/such/path
11COPYFILES=runtests tests.init server domount.c README Testitems getopt.c
12
13# -----------------------------------------------
14# Defines for various variables used in this and
15# other Makefiles.
16
17# Define NFS3_2 for Sun NFS 3.2 compatibility
18# COMPAT = -DNFS3_2
19
20# Use with Sys V Release 3 systems.
21# SYSTYPE=-DSVR3
22# LIBS=-lrpc
23# COMPAT = -DSVR3
24
25# Use with BSD systems.
26SYSTYPE=
27LIBS=
28COMPAT=
29# -----------------------------------------------
30
31CFLAGS= ${SYSTYPE} -O
32
33all: domount getopt
34 cd basic; $(MAKE) SYSTYPE="$(SYSTYPE)" LIBS="$(LIBS)" COMPAT="$(COMPAT)"
35 cd general; $(MAKE) SYSTYPE="$(SYSTYPE)" LIBS="$(LIBS)" COMPAT="$(COMPAT)"
36 cd special; $(MAKE) SYSTYPE="$(SYSTYPE)" LIBS="$(LIBS)" COMPAT="$(COMPAT)"
37
38domount: domount.c
39 $(CC) $(CFLAGS) -o $@ $@.c
40 chown root domount
41 chmod u+s domount
42
43getopt: getopt.c
44 $(CC) $(CFLAGS) -o $@ $@.c
45
46clean:
47 rm -f domount getopt
48 cd basic; $(MAKE) clean
49 cd general; $(MAKE) clean
50 cd special; $(MAKE) clean
51 cd tools; $(MAKE) clean;
52
53copy: mknewdirs
54 cp $(COPYFILES) $(DESTDIR)
55 cd basic; $(MAKE) copy DESTDIR=$(DESTDIR)/basic
56 cd general; $(MAKE) copy DESTDIR=$(DESTDIR)/general
57 cd special; $(MAKE) copy DESTDIR=$(DESTDIR)/special
58 cd tools; $(MAKE) copy DESTDIR=$(DESTDIR)/tools
59
60dist: mknewdirs
61 cp Makefile $(COPYFILES) $(DESTDIR)
62 cd basic; $(MAKE) dist DESTDIR=$(DESTDIR)/basic
63 cd general; $(MAKE) dist DESTDIR=$(DESTDIR)/general
64 cd special; $(MAKE) dist DESTDIR=$(DESTDIR)/special
65 cd tools; $(MAKE) dist DESTDIR=$(DESTDIR)/tools
66
67mknewdirs:
68 -mkdir $(DESTDIR)/basic $(DESTDIR)/general $(DESTDIR)/special \
69 $(DESTDIR)/tools