home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / cpio11as.zip / MAKEFILE < prev    next >
Text File  |  1992-02-22  |  3KB  |  106 lines

  1. # Makefile for GNU cpio.
  2. # Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # $Header: e:/gnu/cpio/RCS/makefile 1.1.0.2 90/09/23 23:41:08 tho Exp $
  19.  
  20. .PHONY: all install clean veryclean
  21.  
  22. # Where `make install' should put the binaries:
  23. BINDIR    = c:/bin
  24.  
  25. # Where the gnulib lives
  26. VPATH    = d:/usr/lib;d:/usr/include
  27.  
  28. PROGRAM    = cpio
  29. VERSION    = 1.1
  30.  
  31. INSTALL = cp -v
  32. DISK    = b
  33. ZIPFILE = $(PROGRAM)
  34.  
  35. # DEFS can contain:
  36. # -DUSG            System V strings, headers, ndir.h.
  37. # -DDIRENT        If you have dirent.h.
  38. # -DSYSNDIR        Old Xenix systems (selects sys/ndir.h).
  39. # -DMTIO_MISSING    If you lack sys/mtio.h.
  40. # -DVPRINTF_MISSING    If you lack vprintf function (but have _doprnt).
  41. # -DBCOPY_MISSING    If you lack bcopy function.
  42. # -DMKDIR_MISSING    If you lack mkdir and rmdir system calls.
  43.  
  44. MODEL    = C
  45. CFLAGS    = -A$(MODEL) -Ox -W4 -Za -DUSG -DMTIO_MISSING \
  46.       -DSTDC_HEADERS -DSMART_SHELL
  47. LDFLAGS    = /e/st:0x2000/noe/far/packcode setargv
  48.  
  49. LOADLIBES= gnulib_$(MODEL)
  50.  
  51. SRCS    = copyin.c copyout.c copypass.c dstring.c global.c main.c \
  52.       util.c filemode.c version.c
  53.  
  54. OBJS    = copyin.obj copyout.obj copypass.obj dstring.obj global.obj \
  55.       main.obj util.obj filemode.obj version.obj _cwild.obj
  56. INCS    = cpio.h dstring.h extern.h
  57.  
  58.  
  59. RCSFILES= $(SRCS) $(INCS) makefile
  60. MISC    = readme copying make.inc todo changelog \
  61.       $(addprefix RCS/, glob.c getopt.h error.c getopt.c getopt1.c \
  62.                 msd_dir.h msd_pwd.h)
  63.  
  64. # Targets
  65. all: $(PROGRAM).exe
  66.  
  67. $(PROGRAM).exe: $(OBJS)
  68.     $(LINK) $(LDFLAGS) $^, $@, nul, $(LOADLIBES),
  69.  
  70. copyin.obj copyout.obj copypass.obj main.obj: cpio.h dstring.h extern.h
  71. dstring.obj: dstring.h
  72. global.obj: cpio.h dstring.h
  73. util.obj: extern.h
  74.  
  75. install: $(BINDIR)/$(PROGRAM).exe
  76.  
  77. $(BINDIR)/%: %
  78.     $(INSTALL) $< $@
  79.  
  80. tags: $(SRCS)
  81.     etags -t *.c
  82.  
  83. clean:
  84.     $(RM) *.obj patches *~ *.tar
  85.  
  86. veryclean: clean
  87.     $(RM) *.exe errs tags *.uue
  88.     rcsclean *.c *.h makefile
  89.  
  90. include make.inc
  91.  
  92. .PHONY: dist
  93. dist: $(PROGRAM).uue
  94.  
  95. $(PROGRAM).tar: readme copying makefile patches $(PROGRAM).exe
  96.  
  97. patches: $(SRCS) $(INCS) $(addprefix RCS/, $(RCSFILES))
  98.     rcsdiff -c -r$(VERSION) *.[ch] > $@
  99.  
  100. .PHONY: test-dist
  101. test-dist: $(PROGRAM).uue $(addprefix RCS/, $(RCSFILES))
  102.     $(CO) -f -r$(VERSION) *.[ch]
  103.     sed /\.tar\.Z/s//.Z/ $< | uudecode
  104.     compress -d < $(PROGRAM).Z | tar -xOf -  patches | patch -s
  105.     rcsdiff -q *.[ch]
  106.