home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / GNUISH / FGREP11.ZIP / MAKEFILE < prev    next >
Text File  |  1990-09-24  |  3KB  |  123 lines

  1. # makefile for GNU fgrep (MS-DOS)
  2. # Copyright (C) 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. # MS-DOS specifics parts: Thorsten Ohl, <td12@ddagsi3.bitnet>
  19.  
  20. # $Header: e:/gnu/fgrep/RCS/makefile 1.1.0.6 90/09/24 00:38:02 tho Exp $
  21. #
  22.  
  23. PROGRAM    = fgrep
  24.  
  25. # Where _cwild.c and the gnulib live:
  26. VPATH    = d:/usr/lib;d:/usr/include
  27.  
  28. # Where the executable goes:
  29. BINDIR    = c:/bin
  30. INSTALL = cp -f
  31.  
  32. VERSION    = 1.1
  33.  
  34. # Backups:
  35. DISK    = b:
  36. ZIPFILE = $(PROGRAM).zip
  37.  
  38. # Configuration:
  39.  
  40. MODEL    = C
  41. USE_OBSTACKS = yes
  42.  
  43. # In small model we can use the obstacks, but we can have
  44. # no more than approx. 40 keywords.
  45.  
  46. ifeq ($(MODEL),S)
  47. ifeq ($(USE_OBSTACKS),yes)
  48. OBSTACK    = -DUSE_OBSTACKS
  49. OBSTOBJ    = obstack.obj
  50. OBSTINC    = obstack.h
  51. else
  52. OBSTACK    =
  53. OBSTSRC    =
  54. OBSTINC    =
  55. endif
  56. else
  57. MODEL    = C
  58. OBSTACK    =
  59. OBSTSRC    =
  60. OBSTINC    =
  61. endif
  62.  
  63. CFLAGS    = -A$(MODEL) -Ox -Za -W4 -DSTDC_HEADERS -DSMART_SHELL $(OBSTACK)
  64. LOADLIBES = gnulib_$(MODEL)
  65. LDFLAGS    = /e/st:0x8000/noe/far/packcode setargv
  66.  
  67. OBJS    = fgrep.obj kwset.obj std.obj $(OBSTOBJ) _cwild.obj
  68. SRCS    = fgrep.c kwset.c kwset.h obstack.c obstack.h std.c std.h unix.h
  69.  
  70. RCSFILES= $(SRCS) makefile
  71. MISC    = readme changelo todo make.inc
  72.  
  73. .PHONEY: all zip disk clean veryclean install
  74.  
  75. all: fgrep.exe
  76.  
  77. fgrep.exe: $(OBJS)
  78.  
  79. # This is for old versions of make, where this rule wasn't default
  80. %.exe: %.obj
  81.     $(LINK) $(LDFLAGS) $^, $@, nul, $(LOADLIBES),
  82.  
  83. # Utilities
  84.  
  85. tags: $(SRCS)
  86.     etags -t $^
  87.  
  88. install: $(BINDIR)/$(PROGRAM).exe
  89.  
  90. $(BINDIR)/%: %
  91.     $(INSTALL) $< $@
  92.  
  93. clean:
  94.     $(RM) *.obj *.tar patches *~ *.z
  95.  
  96. veryclean: clean
  97.     $(RM) *.exe errs tags *.uue
  98.     rcsclean *.c *.h makefile
  99.  
  100. fgrep.obj: kwset.h std.h unix.h
  101. kwset.obj obstack.obj: $(OBSTINC)
  102. std.obj: std.h unix.h
  103.  
  104. include make.inc
  105.  
  106. # Distribution
  107.  
  108. .PHONY: dist
  109. dist: fgrep.uue
  110.  
  111. fgrep.tar: readme copying makefile make.inc patches fgrep.exe
  112.  
  113. patches: $(SRCS) $(addprefix RCS/,$(RCSFILES))
  114.     rcsdiff -c -r$(VERSION) $(SRCS) > $@
  115.  
  116. .PHONY: test-dist
  117. test-dist: $(PROGRAM).uue $(addprefix RCS/,$(RCSFILES))
  118.     $(CO) -f -r$(VERSION) $(SRCS)
  119.     sed /\.tar\.Z/s//.Z/ $(PROGRAM).uue | uudecode
  120.     compress -d < $(PROGRAM).Z | tar -xOf -  patches | patch -s
  121.     rcsdiff -q $(SRCS)
  122.  
  123.