home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / futils / futils~1 / src / misc1s.zoo / misc1 / diff / Makefile < prev    next >
Encoding:
Makefile  |  1991-11-09  |  3.5 KB  |  108 lines

  1. # Makefile for GNU DIFF
  2. # Copyright (C) 1988, 1989 Free Software Foundation, Inc.
  3.  
  4. # This file is part of GNU DIFF.
  5.  
  6. # GNU DIFF is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 1, or (at your option)
  9. # any later version.
  10. # GNU DIFF 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. # You should have received a copy of the GNU General Public License
  15. # along with GNU DIFF; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # You can compile this with ordinary cc as well,
  19. # but gcc makes it faster.
  20. # Also, gcc supports -O and -g together.
  21. SHELL=d:/gnu/bin/bash.ttp
  22. CC=cc -O
  23. CFLAGS = -g
  24. INSTALL = install
  25.  
  26. # On system V, enable these three lines:
  27. # CFLAGS = -g -DUSG
  28. # LIBS = -lPW
  29. # INSTALL = cp
  30. # (If you compile with GCC, you don't need to define LIBS.)
  31. # And, depending on the names and contents of your header files,
  32. # add either -DHAVE_NDIR or -DHAVE_DIRECT or both to CFLAGS.
  33. # Add -DHAVE_NDIR to CFLAGS if your system used ndir.h instead of dirent.h
  34. # Add -DHAVE_DIRECT to CFLAGS if your system uses 'struct direct' instead of
  35. # 'struct dirent' (this is the case at least with one add-on ndir library).
  36.  
  37. # Use these definitions for XENIX:
  38. # There are rumors of bugs in various Xenix's dirent.h and -ldir.  As
  39. # a result, we suggest using HAVE_NDIR and not using -ldir.
  40. # CFLAGS = -O -DUSG -DXENIX -DHAVE_NDIR -DHAVE_DIRECT -DNDIR_IN_SYS
  41. # LIBS = -lx -lPW
  42. # INSTALL = cp
  43.  
  44. # Some System V machines do not come with libPW.  If this is true, use
  45. # the GNU alloca by switching the comment on the following lines.
  46. ALLOCA = 
  47. # ALLOCA = $(archpfx)/alloca.o
  48.  
  49. bindir=/gnu/bin
  50. prefix=
  51.  
  52. # All source files
  53. srcs=diff.c analyze.c io.c context.c ed.c normal.c ifdef.c util.c dir.c \
  54.     version.c diff.h regex.c regex.h limits.h diff3.c \
  55.     getopt.c getopt1.c getopt.h alloca.c
  56. # Object files for diff only.
  57. objs=$(archpfx)diff.o $(archpfx)analyze.o $(archpfx)io.o $(archpfx)context.o \
  58.      $(archpfx)ed.o $(archpfx)normal.o $(archpfx)util.o $(archpfx)dir.o \
  59.      $(archpfx)regex.o $(archpfx)ifdef.o $(archpfx)version.o \
  60.      $(archpfx)getopt.o $(archpfx)getopt1.o
  61. tapefiles = $(srcs) README diagmeet.note Makefile COPYING ChangeLog
  62.  
  63. all: $(archpfx)diff.ttp $(archpfx)diff3.ttp
  64.  
  65. $(archpfx)diff3.ttp: $(archpfx)diff3.o
  66.     $(CC) -o $(archpfx)diff3.ttp $(CFLAGS) $(LDFLAGS) $(archpfx)diff3.o $(LIBS)
  67.  
  68. $(archpfx)diff.ttp: $(objs)
  69.     $(CC) -o $(archpfx)diff.ttp $(CFLAGS) $(LDFLAGS) $(objs) $(LIBS)
  70.  
  71. $(objs): diff.h
  72.  
  73. $(archpfx)context.o $(archpfx)diff.o: regex.h
  74.  
  75. $(archpfx)diff3.o: diff3.c
  76.     $(CC) -c $(CFLAGS) -DDIFF_PROGRAM=\"$(bindir)/diff.ttp\" diff3.c \
  77.  $(OUTPUT_OPTION)
  78.  
  79. clean:
  80.     rm -f *.o $(archpfx)diff $(archpfx)diff3 diff.tar diff.tar.Z
  81.  
  82. install: install-diff install-diff3
  83.  
  84. install-diff: $(prefix)$(bindir)/diff
  85.  
  86. $(prefix)$(bindir)/diff: $(archpfx)diff
  87.     $(INSTALL) $(archpfx)diff $(prefix)$(bindir)/diff
  88.  
  89. install-diff3: $(prefix)$(bindir)/diff3
  90.  
  91. $(prefix)$(bindir)/diff3: $(archpfx)diff3
  92.     $(INSTALL) $(archpfx)diff3 $(prefix)$(bindir)/diff3
  93.  
  94. diff.tar: $(tapefiles)
  95.     mkdir tmp
  96.     mkdir tmp/diff
  97.     -ln $(tapefiles) tmp/diff
  98.     for file in $(tapefiles); do \
  99.         if [ ! -r tmp/diff/$$file ]; then cp $$file tmp/diff; fi \
  100.     done
  101.     cd tmp; tar cf ../diff.tar diff
  102.     rm -rf tmp
  103.  
  104. diff.tar.Z: diff.tar
  105.     compress < diff.tar > diff.tar.Z
  106.