home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / diff115.lzh / DIFF115 / MAKEFILE.ORI < prev    next >
Text File  |  1991-01-30  |  4KB  |  107 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. CC=gcc -O
  22. CFLAGS = -g
  23. INSTALL = install
  24.  
  25. # On system V, enable these three lines:
  26. # CFLAGS = -g -DUSG
  27. # LIBS = -lPW
  28. # INSTALL = cp
  29. # (If you compile with GCC, you don't need to define LIBS.)
  30. # And, depending on the names and contents of your header files,
  31. # add either -DHAVE_NDIR or -DHAVE_DIRECT or both to CFLAGS.
  32. # Add -DHAVE_NDIR to CFLAGS if your system used ndir.h instead of dirent.h
  33. # Add -DHAVE_DIRECT to CFLAGS if your system uses 'struct direct' instead of
  34. # 'struct dirent' (this is the case at least with one add-on ndir library).
  35.  
  36. # Use these definitions for XENIX:
  37. # There are rumors of bugs in various Xenix's dirent.h and -ldir.  As
  38. # a result, we suggest using HAVE_NDIR and not using -ldir.
  39. # CFLAGS = -O -DUSG -DXENIX -DHAVE_NDIR -DHAVE_DIRECT -DNDIR_IN_SYS
  40. # LIBS = -lx -lPW
  41. # INSTALL = cp
  42.  
  43. # Some System V machines do not come with libPW.  If this is true, use
  44. # the GNU alloca by switching the comment on the following lines.
  45. ALLOCA = 
  46. # ALLOCA = $(archpfx)/alloca.o
  47.  
  48. bindir=/usr/local/bin
  49. prefix=
  50.  
  51. # All source files
  52. srcs=diff.c analyze.c io.c context.c ed.c normal.c ifdef.c util.c dir.c \
  53.     version.c diff.h regex.c regex.h limits.h diff3.c \
  54.     getopt.c getopt1.c getopt.h alloca.c
  55. # Object files for diff only.
  56. objs=$(archpfx)diff.o $(archpfx)analyze.o $(archpfx)io.o $(archpfx)context.o \
  57.      $(archpfx)ed.o $(archpfx)normal.o $(archpfx)util.o $(archpfx)dir.o \
  58.      $(archpfx)regex.o $(archpfx)ifdef.o $(archpfx)version.o \
  59.      $(archpfx)getopt.o $(archpfx)getopt1.o
  60. tapefiles = $(srcs) README diagmeet.note Makefile COPYING ChangeLog
  61.  
  62. all: $(archpfx)diff $(archpfx)diff3
  63.  
  64. $(archpfx)diff3: $(archpfx)diff3.o
  65.     $(CC) -o $(archpfx)diff3 $(CFLAGS) $(LDFLAGS) $(archpfx)diff3.o $(LIBS)
  66.  
  67. $(archpfx)diff: $(objs)
  68.     $(CC) -o $(archpfx)diff $(CFLAGS) $(LDFLAGS) $(objs) $(LIBS)
  69.  
  70. $(objs): diff.h
  71.  
  72. $(archpfx)context.o $(archpfx)diff.o: regex.h
  73.  
  74. $(archpfx)diff3.o: diff3.c
  75.     $(CC) -c $(CFLAGS) -DDIFF_PROGRAM=\"$(bindir)/diff\" diff3.c \
  76.  $(OUTPUT_OPTION)
  77.  
  78. clean:
  79.     rm -f *.o $(archpfx)diff $(archpfx)diff3 diff.tar diff.tar.Z
  80.  
  81. install: install-diff install-diff3
  82.  
  83. install-diff: $(prefix)$(bindir)/diff
  84.  
  85. $(prefix)$(bindir)/diff: $(archpfx)diff
  86.     $(INSTALL) $(archpfx)diff $(prefix)$(bindir)/diff
  87.  
  88. install-diff3: $(prefix)$(bindir)/diff3
  89.  
  90. $(prefix)$(bindir)/diff3: $(archpfx)diff3
  91.     $(INSTALL) $(archpfx)diff3 $(prefix)$(bindir)/diff3
  92.  
  93. diff.tar: $(tapefiles)
  94.     mkdir tmp
  95.     mkdir tmp/diff
  96.     -ln $(tapefiles) tmp/diff
  97.     for file in $(tapefiles); do \
  98.         if [ ! -r tmp/diff/$$file ]; then cp $$file tmp/diff; fi \
  99.     done
  100.     cd tmp; tar cf ../diff.tar diff
  101.     rm -rf tmp
  102.  
  103. diff.tar.Z: diff.tar
  104.     compress < diff.tar > diff.tar.Z
  105.