home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Utilities / vmount-0.6a-I / src / nfs / Makefile next >
Encoding:
Makefile  |  1996-12-16  |  1.3 KB  |  62 lines

  1. # Name: Makefile
  2. # Description: Makefile for the nfs directory. It uses rpcgen to generate
  3. #     the rpc server stubs.
  4. # Author: Christian Starkjohann <cs@hal.kph.tuwien.ac.at>
  5. # Date: 1996-11-14
  6. # Copyright: GNU-GPL
  7. # Tabsize: 4
  8.  
  9. VPATH = .
  10. srcdir = .
  11.  
  12. #CC = gcc
  13. AR = ar
  14. RANLIB = ranlib
  15.  
  16. RPCGEN = rpcgen 
  17.  
  18. CFLAGS = -g -I. -I..
  19. LDFLAGS = -g
  20. WARNFLAGS = -Wall
  21. RPC_WARNFLAGS = -Wno-unused -Wno-switch -Wno-uninitialized
  22. TRANSPORTFLAGS =  -s udp -s tcp
  23.  
  24. XDRFILES    = nfs_prot.x
  25. OFILES        = nfs_prot_xdr.o nfs_prot_sstub.o mount.o nfs_funcs.o
  26.  
  27. all: nfs.o
  28.  
  29. COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARNFLAGS)
  30.  
  31. .c.o:
  32.     $(COMPILE) $<
  33.  
  34. nfs.o: $(OFILES)
  35.     $(LD) -r -o $@ $(OFILES)
  36.  
  37. nfs_prot.h: nfs_prot.x
  38.     rm -f $@
  39.     $(RPCGEN) -h -o $@ $?
  40.  
  41. nfs_prot_xdr.c: nfs_prot.x
  42.     rm -f $@
  43.     $(RPCGEN) -c $? | \
  44.         sed 's;^#include ".*/nfs_prot.h"$$;#include "nfs_prot.h";' >$@
  45.  
  46. nfs_prot_sstub.c: nfs_prot.x
  47.     rm -f $@
  48.     $(RPCGEN) $(TRANSPORTFLAGS) $? | \
  49.         sed -e 's/main/int nfsd_&/' \
  50.             -e 's/static//g' \
  51.             -e 's;^#include ".*/nfs_prot.h"$$;#include "nfs_prot.h";' >$@
  52.  
  53. nfs_prot_xdr.o: nfs_prot_xdr.c nfs_prot.h
  54.     $(COMPILE) $(RPC_WARNFLAGS) -c nfs_prot_xdr.c
  55. nfs_prot_sstub.o: nfs_prot_sstub.c nfs_prot.h
  56.     $(COMPILE) $(RPC_WARNFLAGS) -c nfs_prot_sstub.c
  57.  
  58.  
  59. clean:
  60.     rm -f $(OFILES) nfs.o nfs_prot.h nfs_prot_xdr.c nfs_prot_sstub.c
  61.  
  62.