home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / online / source / c / compilers / DiffUtils.sit.hqx / DiffUtils / src / Makefile < prev    next >
Makefile  |  1994-02-14  |  5KB  |  142 lines

  1. # Makefile for GNU DIFF
  2. # Copyright (C) 1988, 1989, 1991, 1992 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 2, 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. # MPW port Matthias Neeracher <neeri@iis.ethz.ch>
  19. #
  20.  
  21. #### Start of system configuration section. ####
  22.  
  23. srcdir = :
  24. bindir = {MPW}LocalTools:
  25.  
  26. CC = C
  27.  
  28. # Things you might add to DEFS:
  29. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  30. # -DHAVE_UNISTD_H    If you have unistd.h.
  31. # -DUSG            If you have System V/ANSI C string and
  32. #            memory functions and headers, fcntl.h, and ndir.h.
  33. # -DDIRENT        If you have dirent.h.
  34. # -DSYSNDIR        Old Xenix systems (selects sys/ndir.h).
  35. # -DHAVE_VFORK_H    If you have vfork and it needs vfork.h.
  36. # -DHAVE_DUP2        If you have dup2 system call.
  37. # -DHAVE_WAITPID    If you have waitpid system call.
  38. # -DHAVE_ST_BLKSIZE    If your struct stat has an st_blksize member.
  39. # -DHAVE_STRERROR    If you have strerror function.
  40. # -DHAVE_ALLOCA_H    If you have a working alloca.h.
  41.  
  42. DEFS = -d STDC_HEADERS -d HAVE_DUP2 -d HAVE_ST_BLKSIZE -d HAVE_MEMCHR -d HAVE_STRERROR -d VOID_CLOSEDIR
  43.  
  44. COptions = -r -mbg on -sym on {DEFS}
  45. CPlusOptions = -mf -r -mbg on -sym on 
  46. LOptions = -mf -sym on -d
  47. LIBS =    "{CLibraries}GUSI.o"                                        ∂
  48.             "{Libraries}Runtime.o"                                    ∂
  49.             "{Libraries}Interface.o"                                ∂
  50.             "{CLibraries}StdCLib.o"                                    ∂
  51.             "{Libraries}ToolLibs.o"
  52.  
  53. # Some System V machines do not come with libPW.
  54. # If this is true for you, use the GNU alloca.o here.
  55.  
  56. ALLOCA = alloca.c.o
  57.  
  58. # The source files for all of the programs.
  59. srcs=diff.c analyze.c io.c context.c ed.c normal.c ifdef.c util.c dir.c ∂
  60.     version.c diff.h regex.c regex.h side.c system.h limits.h ∂
  61.     diff3.c sdiff.c cmp.c error.c xmalloc.c getopt.c getopt1.c getopt.h ∂
  62.     fnmatch.c fnmatch.h alloca.c cmpbuf.c
  63. # Object files for diff only.
  64. objs=diff.c.o analyze.c.o io.c.o context.c.o ∂
  65.      ed.c.o normal.c.o util.c.o dir.c.o fnmatch.c.o ∂
  66.      regex.c.o side.c.o ifdef.c.o version.c.o ∂
  67.      getopt.c.o getopt1.c.o cmpbuf.c.o {ALLOCA}
  68.  
  69. .c.o ƒ .c
  70.     {C} {COptions} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  71.  
  72. # all ƒ diff diff3 sdiff cmp
  73. all ƒ diff cmp 
  74.  
  75. diff    ƒƒ {objs}
  76.     Link {LOptions} -t 'MPST' -c 'MPS ' -o diff {objs} {LIBS}
  77.  
  78. diff    ƒƒ    diff.r diff.rsrc
  79.     Rez -a  -t 'MPST' -c 'MPS ' -o diff diff.r
  80.  
  81. cmp    ƒƒ    cmp.c.o getopt.c.o getopt1.c.o error.c.o xmalloc.c.o cmpbuf.c.o version.c.o {ALLOCA}
  82.     Link {LOptions} -t 'MPST' -c 'MPS ' -o cmp {LIBS}    ∂
  83.         cmp.c.o getopt.c.o getopt1.c.o error.c.o xmalloc.c.o cmpbuf.c.o version.c.o {ALLOCA}
  84.         
  85. cmp    ƒƒ    cmp.r
  86.     Rez -a  -t 'MPST' -c 'MPS ' -o cmp cmp.r
  87.  
  88. # diff3: diff3.o getopt.o getopt1.o version.o $(ALLOCA)
  89. #    $(CC) -o $@ $(LDFLAGS) diff3.o getopt.o getopt1.o version.o $(ALLOCA) $(LIBS)
  90. #
  91. # sdiff: sdiff.o getopt.o getopt1.o version.o $(ALLOCA)
  92. #    $(CC) -o $@ $(LDFLAGS) sdiff.o getopt.o getopt1.o version.o $(ALLOCA) $(LIBS)
  93. #
  94. # cmp: cmp.o getopt.o getopt1.o error.o xmalloc.o $(ALLOCA)
  95. #     $(CC) -o $@ $(LDFLAGS) cmp.o getopt.o getopt1.o error.o xmalloc.o $(ALLOCA) $(LIBS)
  96. # diff.info: diff.texi
  97. #     $(MAKEINFO) $(srcdir)/diff.texi
  98.     
  99. {objs}                                                                        ƒ    diff.h system.h
  100. cmp.c.o diff3.c.o sdiff.c.o                                            ƒ    system.h
  101. context.c.o diff.c.o regex.c.o                                        ƒ    regex.h
  102. cmp.c.o diff.c.o diff3.c.o sdiff.c.o getopt.c.o getopt1.c.o    ƒ    getopt.h
  103. diff.c.o fnmatch.c.o                                                        ƒ    fnmatch.h
  104.  
  105. # diff3.o: diff3.c
  106. #     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -DDIFF_PROGRAM=\"$(bindir)/diff\" $(srcdir)/diff3.c
  107.  
  108. # sdiff.o: sdiff.c
  109. #     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -DDIFF_PROGRAM=\"$(bindir)/diff\" $(srcdir)/sdiff.c
  110.  
  111. # TAGS: $(srcs)
  112. #     etags $(srcs)
  113.  
  114. clean    ƒ
  115.     SafeDel -y ≈.c.o diff diff3 sdiff cmp core
  116.  
  117. install ƒ
  118.     Backup -a diff cmp -to {bindir}>DoInstall && (DoInstall ; delete DoInstall)
  119.  
  120. # install: all
  121. #     for p in diff diff3 sdiff cmp; \
  122. #     do $(INSTALL_PROGRAM) $$p $(bindir)/$(binprefix)$$p; done
  123. #     cd $(srcdir); for f in diff.info*; \
  124. #     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  125.  
  126. # uninstall: all
  127. #     for p in diff diff3 sdiff cmp; \
  128. #     do rm -f $(bindir)/$(binprefix)$$p; done
  129. #     rm -f $(infodir)/diff.info*
  130.  
  131. distr    ƒ all Diff.ps
  132.     Distribute Diff.distr DiffUtils_261.sit        
  133.  
  134. Diff.dvi    ƒ    Diff.texi
  135.     texi2dvi Diff.texi
  136.  
  137. Diff.ps    ƒ    Diff.dvi
  138.     dvips -o Diff.ps Diff.dvi
  139.