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