home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / f / find12as.zip / MAKEFILE < prev    next >
Text File  |  1992-02-22  |  4KB  |  158 lines

  1. # Makefile for GNU find.
  2. # Copyright (C) 1987, 1990 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # $Header: e:/gnu/find/RCS/makefile 1.2.0.4 90/09/23 19:04:35 tho Exp $
  19.  
  20. # Use a Microsoft C 6.0 kludge ...
  21. MSC    = 600
  22.  
  23. # Where to find utility program objects or sources
  24. VPATH    = d:/usr/lib;d:/usr/include
  25.  
  26. # DEFS might contain:
  27. # -DDEBUG        Print a trace tree.
  28. # -DUSG            System V string headers and functions; ndir.h.
  29. # -DDIRENT        If you have dirent.h.
  30. # -DSYSNDIR        Old Xenix systems (selects sys/ndir.h).
  31. # -DVPRINTF_MISSING    If you lack vprintf function (but have _doprnt).
  32. # -DSTRSPN_MISSING    If you lack strspn function.
  33. # -DMNTENT_MISSING    If you lack mntent.h (makes -fstype always false).
  34. DEFS    = -DMNTENT_MISSING -DUSG -DSTDC_HEADERS
  35.  
  36. MODEL    = S
  37.  
  38. ifeq ($(BUILD),debug)
  39. CFLAGS    = $(DEFS) -A$(MODEL) -Za -W4 -Od -Zi -DSMART_SHELL -DDEBUG
  40. LDFLAGS    = /co/st:0x8000/far/packcode/noe setargv
  41. else
  42. CFLAGS    = $(DEFS) -A$(MODEL) -Za -W4 -Ox -DSMART_SHELL
  43. LDFLAGS    = /e/st:0x8000/far/packcode/noe setargv
  44. endif
  45.  
  46. # Directory in which to install 'find' and 'fastfind'.
  47. BINDIR    = c:/bin
  48.  
  49. # Directory in which to install 'updatedb'
  50. BATDIR    = c:/bat
  51.  
  52. # Directory in which to install programs to create fast-find database.
  53. LIBDIR    = c:/scripts
  54.  
  55. # Data file for fast-find.
  56. FCODES    = $(LIBDIR)/find.codes
  57.  
  58. INSTALL = cp -v
  59. DISK    = b
  60. ZIPFILE = find
  61.  
  62. # Files
  63.  
  64. INCS    = defs.h modechange.h
  65. SRCS    = find.c parser.c tree.c pred.c util.c fstype.c listfile.c \
  66.       filemode.c modechange.c savedir.c version.c fastfind.c
  67. OBJECTS    = find.obj parser.obj tree.obj pred.obj util.obj \
  68.       fstype.obj listfile.obj filemode.obj modechange.obj \
  69.       savedir.obj version.obj _cwild.obj
  70.  
  71. CMDS    = find.exe fastfind.exe lib/bigram.exe lib/code.exe
  72. LOADLIBES = gnulib_$(MODEL)
  73.  
  74. VERSION = 1.2
  75.  
  76. RCSFILES= $(SRCS) $(INCS) makefile
  77. MISC    = readme todo changelo copying \
  78.       $(addprefix lib/RCS/, makefile bigram.c code.c uniq-c \
  79.                 updatedb.sh updatedb.bat) \
  80.       $(addprefix RCS/, error.c glob.c regex.c regex.h)
  81.  
  82. # targets
  83.  
  84. .PHONY: all FORCE
  85. all: $(CMDS)
  86.  
  87. lib/%.exe: FORCE
  88.     $(MAKE) -wC lib LIBDIR=$(LIBDIR) BINDIR=$(BINDIR) FCODES=$(FCODES)
  89.  
  90. FORCE:
  91.  
  92. find.exe: $(OBJECTS)
  93. fastfind.exe: fastfind.obj _cwild.obj
  94.  
  95. # This is for old versions of make, where this rule wasn't default
  96. %.exe: %.obj
  97.     $(LINK) $(LDFLAGS) $^, $@, nul, $(LOADLIBES),
  98.  
  99. ifeq ($(MSC),600)
  100. CL:=$(CFLAGS)
  101. fastfind.obj: fastfind.c
  102.     CL -DFCODES=\\"$(FCODES)\\" -c $<
  103. else
  104. fastfind.obj: fastfind.c
  105.     $(CC) $(CFLAGS) -DFCODES=\"$(FCODES)\" -c $<
  106. endif
  107.  
  108. modechange.obj parser.obj: modechange.h
  109. find.obj parser.obj tree.obj pred.obj utils.obj: defs.h
  110.  
  111. install: all lib/uniq-c lib/updatedb.bat
  112.     $(INSTALL) $(CMDS) $(BINDIR)
  113.     $(INSTALL) lib/uniq-c $(LIBDIR)
  114.     $(INSTALL) lib/updatedb.bat $(BATDIR)
  115.  
  116. # Utilities
  117.  
  118. tags: $(SRCS)
  119.     etags *.c
  120.  
  121. clean:
  122.     $(RM) *.obj *.tar patches *.z *~
  123.     -rcsclean lib/*.c
  124.  
  125. veryclean: clean
  126.     $(RM) *.exe tags errs lib/*.exe *.uue
  127.     rcsclean *.c *.h makefile
  128.  
  129. include make.inc
  130.  
  131. # Distribution
  132.  
  133. .PHONY: dist
  134. dist: find.uue find-b.uue
  135.  
  136. find.tar: readme copying makefile make.inc patches lib/makefile
  137. find-b.tar: readme copying lib/updatedb.bat lib/uniq-c $(CMDS)
  138.  
  139. patches: $(SRCS) $(INCS) lib/bigram.c lib/code.c \
  140.      $(RCSFILES) lib/RCS/bigram.c lib/RCS/code.c
  141.     rcsdiff -c -r$(VERSION) *.c *.h lib/*.c > $@
  142.  
  143. .PHONY: test-dist
  144. test-dist: find.uue $(RCSFILES) lib/RCS/bigram.c lib/RCS/code.c
  145.     $(CO) -f -r$(VERSION) $(SRCS) $(INCS) lib/bigram.c lib/code.c
  146.     sed /\.tar\.Z/s//.Z/ find.uue | uudecode
  147.     compress -d < find.Z | tar -xOf -  patches | patch -s -p
  148.     $(RM) find.Z
  149.     rcsdiff -q *.c *.h lib/*.c
  150.  
  151. #
  152. # Local Variables:
  153. # mode:Text
  154. # ChangeLog:ChangeLog
  155. # compile-command:make
  156. # End:
  157.  
  158.