Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. CC=gcc
  2. CFLAGS=-g -O0 -Wall -W -I../..
  3. LIBS=
  4. LIBNFS_OBJ = libnfs-raw-mount.o libnfs-raw-portmap.o libnfs-raw-nfs.o libnfs-raw-nfsacl.o mount.o nfs.o nfsacl.o portmap.o pdu.o init.o socket.o libnfs.o libnfs-sync.o
  5. all: tools/nfsclient-raw tools/nfsclient-async tools/nfsclient-sync
  6. tools/nfsclient-async: tools/nfsclient-async.c libnfs.a
  7. $(CC) $(CFLAGS) -o $@ tools/nfsclient-async.c libnfs.a $(LIBS)
  8. tools/nfsclient-sync: tools/nfsclient-sync.c libnfs.a
  9. $(CC) $(CFLAGS) -o $@ tools/nfsclient-sync.c libnfs.a $(LIBS)
  10. tools/nfsclient-raw: tools/nfsclient-raw.c libnfs.a
  11. $(CC) $(CFLAGS) -o $@ tools/nfsclient-raw.c libnfs.a $(LIBS)
  12. libnfs.a: $(LIBNFS_OBJ)
  13. @echo Creating library $@
  14. ar r libnfs.a $(LIBNFS_OBJ)
  15. ranlib libnfs.a
  16. rpc/mount.h: rpc/mount.x
  17. @echo Generating $@
  18. rpcgen -h rpc/mount.x > $@
  19. libnfs-raw-mount.c: rpc/mount.x
  20. @echo Generating $@
  21. rpcgen -c rpc/mount.x > libnfs-raw-mount.c
  22. libnfs-raw-mount.o: libnfs-raw-mount.c rpc/mount.h
  23. @echo Compiling $@
  24. gcc -g -c libnfs-raw-mount.c -o $@
  25. rpc/nfs.h: rpc/nfs.x
  26. @echo Generating $@
  27. rpcgen -h rpc/nfs.x > $@
  28. libnfs-raw-nfs.c: rpc/nfs.x
  29. @echo Generating $@
  30. rpcgen -c rpc/nfs.x > $@
  31. libnfs-raw-nfs.o: libnfs-raw-nfs.c rpc/nfs.h
  32. @echo Compiling $@
  33. gcc -g -c libnfs-raw-nfs.c -o $@
  34. rpc/nfsacl.h: rpc/nfsacl.x
  35. @echo Generating $@
  36. rpcgen -h rpc/nfsacl.x > $@
  37. libnfs-raw-nfsacl.c: rpc/nfsacl.x
  38. @echo Generating $@
  39. rpcgen -c rpc/nfsacl.x > $@
  40. libnfs-raw-nfsacl.o: libnfs-raw-nfsacl.c rpc/nfsacl.h
  41. @echo Compiling $@
  42. gcc -g -c libnfs-raw-nfsacl.c -o $@
  43. rpc/portmap.h: rpc/portmap.x
  44. @echo Generating $@
  45. rpcgen -h rpc/portmap.x > $@
  46. libnfs-raw-portmap.c: rpc/portmap.x
  47. @echo Generating $@
  48. rpcgen -c rpc/portmap.x > $@
  49. libnfs-raw-portmap.o: libnfs-raw-portmap.c rpc/portmap.h
  50. @echo Compiling $@
  51. gcc -g -c libnfs-raw-portmap.c -o $@
  52. clean:
  53. rm -f *.o
  54. rm -f *.a
  55. rm -f rpc/mount.h libnfs-raw-mount.c
  56. rm -f rpc/nfs.h libnfs-raw-nfs.c
  57. rm -f rpc/nfsacl.h libnfs-raw-nfsacl.c
  58. rm -f rpc/portmap.h libnfs-raw-portmap.c
  59. rm -f tools/nfsclient-raw tools/nfsclient-async tools/nfsclient-sync