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

  1. #  GNU SED, a batch stream editor.
  2. #  Copyright (C) 1989, Free Software Foundation, Inc.
  3. #  Thorsten Ohl, td12@ddagsi3.bitnet, 1990
  4.  
  5. #  This program is free software; you can redistribute it and/or modify
  6. #  it under the terms of the GNU General Public License as published by
  7. #  the Free Software Foundation; either version 1, or (at your option)
  8. #  any later version.
  9.  
  10. #  This program is distributed in the hope that it will be useful,
  11. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. #  GNU General Public License for more details.
  14.  
  15. #  You should have received a copy of the GNU General Public License
  16. #  along with this program; if not, write to the Free Software
  17. #  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #  $Header: e:/gnu/sed/RCS/makefile 1.6.1.1 90/09/22 18:09:59 tho Exp $
  20.  
  21. # Entry points
  22. .PHONY: all install clean veryclean zip disk
  23.  
  24. # Where _cwild.c and the gnulib live:
  25. VPATH    = d:/usr/lib;d:/usr/include
  26.  
  27. # Where the executable goes:
  28. BINDIR    = c:/bin
  29. INSTALL = cp -f
  30.  
  31. PROGRAM = sed
  32. VERSION    = 1.6
  33.  
  34. DISK    = b
  35. ZIPFILE = sed
  36.  
  37. # compiler and linker
  38.  
  39. # The small model is sufficient for most (few lines) scripts, but
  40. # the compact model is recommended for more complicated applications.
  41. MODEL    = C
  42.  
  43. ifeq ($(BUILD),debug)
  44. CFLAGS    = -A$(MODEL) -Za -DUSG -W4 -Od -Zi -DSTDC_HEADERS -DSMART_SHELL
  45. LDFLAGS    = /co/noe/st:0x8000/far/packcode setargv
  46. else
  47. CFLAGS    = -A$(MODEL) -Za -DUSG -W4 -Ox -DSTDC_HEADERS -DSMART_SHELL
  48. LDFLAGS    = /e/noe/st:0x8000/far/packcode setargv
  49. endif
  50.  
  51. # files
  52. OBJS    = sed.obj _cwild.obj
  53. SRCS    = sed.c
  54. LOADLIBES = gnulib_$(MODEL)
  55.  
  56. RCSFILES= $(SRCS) makefile
  57. MISC    = ChangeLog README Todo make.inc
  58.  
  59. all: $(PROGRAM).exe
  60.  
  61. $(PROGRAM).exe: $(OBJS)
  62.  
  63. # This is for old versions of make, where this rule wasn't default
  64. %.exe: %.obj
  65.     $(LINK) $(LDFLAGS) $^, $@, nul, $(LOADLIBES),
  66.  
  67. # utils:
  68.  
  69. install: $(BINDIR)/$(PROGRAM).exe
  70.  
  71. $(BINDIR)/$(PROGRAM).exe: $(PROGRAM).exe
  72.     $(INSTALL) $^ $@
  73.  
  74. clean:
  75.     $(RM) *.obj *.tar patches *~
  76.  
  77. veryclean: clean
  78.     $(RM) *.exe errs tags *.uue
  79.     rcsclean *.c makefile
  80.  
  81. tags: $(SRCS)
  82.     etags $^
  83.  
  84. dist: $(PROGRAM).uue
  85.  
  86. $(PROGRAM).tar: README makefile make.inc patches $(PROGRAM).exe
  87.  
  88. patches: $(SRCS)
  89.     rcsdiff -c -r$(VERSION) $^ > $@
  90.  
  91. .PHONY: test-dist
  92. test-dist: $(PROGRAM).uue $(addprefix RCS/, $(RCSFILES))
  93.     $(CO) -f -r$(VERSION) $(SRCS)
  94.     sed /\.tar\.Z/s//.Z/ $< | uudecode
  95.     compress -d < $(PROGRAM).Z | tar -xOf - patches | patch -s
  96.     $(RM) $(PROGRAM).Z
  97.     rcsdiff -q $(SRCS)
  98.  
  99. include make.inc
  100.