home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / sys / tests / nfs / unix-tests / Makefile < prev    next >
Encoding:
Makefile  |  1990-01-10  |  1.8 KB  |  70 lines

  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.  
  9. MAKE=make
  10. DESTDIR=/no/such/path
  11. COPYFILES=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.
  26. SYSTYPE=
  27. LIBS=
  28. COMPAT=
  29. # -----------------------------------------------
  30.  
  31. CFLAGS= ${SYSTYPE} -O
  32.  
  33. all: 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.  
  38. domount: domount.c
  39.     $(CC) $(CFLAGS) -o $@ $@.c
  40.     chown root domount
  41.     chmod u+s domount
  42.  
  43. getopt: getopt.c
  44.     $(CC) $(CFLAGS) -o $@ $@.c
  45.  
  46. clean:
  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.  
  53. copy: 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.  
  60. dist: 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.  
  67. mknewdirs:
  68.     -mkdir $(DESTDIR)/basic $(DESTDIR)/general $(DESTDIR)/special \
  69.            $(DESTDIR)/tools
  70.