home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / GNUGREP / MAKEFILE < prev    next >
Text File  |  1994-05-20  |  1KB  |  57 lines

  1. # Makefile for GNU grep
  2. # Copyright (C) 1992 Free Software Foundation, Inc.
  3.  
  4. AWK=gawk
  5.  
  6. release:
  7.     $(MAKE) grep.exe egrep.exe fgrep.exe gnugrep.dll gnuregex.dll \
  8.     CC="gcc -Zomf -Zmtd -O -s" O=".obj" RELEASE=""
  9. debug:
  10.     $(MAKE) grep.exe CC="gcc -g" O=".o" DEBUG=""
  11.  
  12. RELEASE=release
  13. DEBUG=debug
  14.  
  15. CFLAGS=-DGREP -DUSG -DSTDC_HEADERS -DHAVE_UNISTD_H -DHAVE_STRING_H \
  16.     -DHAVE_STRERROR -DHAVE_MEMCHR
  17.  
  18. OBJ=grep$O getopt$O dfa$O kwset$O obstack$O search$O
  19.  
  20. .SUFFIXES: .c $O
  21.  
  22. .c$O:
  23.     $(CC) $(CFLAGS) -I. -c $<
  24.  
  25. gnugrep.dll: $(OBJ) regex.lib gnugrep.def
  26.     $(CC) -Zdll -o $@ $(OBJ) regex.lib gnugrep.def
  27.  
  28. gnuregex.dll: regex$O gnuregex.def
  29.     $(CC) -Zdll -o $@ regex$O gnuregex.def
  30.  
  31. regex.lib: gnuregex.def
  32.     emximp -o regex.imp gnuregex.def
  33.     emximp -o $@ regex.imp
  34.     rm -f regex.imp
  35.  
  36. egrep.exe fgrep.exe: grep.exe
  37.     copy grep.exe $@
  38.  
  39. $(RELEASE)grep.exe: main$O grep.def
  40.     $(CC) -o $@ main$O grep.def
  41.  
  42. $(RELEASE)grep$O: grep.c
  43.     $(CC) $(CFLAGS) -I. -c -Dmain=grepmain grep.c
  44.  
  45. $(DEBUG)grep.exe: $(OBJ) regex$O grep.def
  46.     $(CC) -o $@ $(OBJ) regex$O grep.def
  47.  
  48. clean:
  49.     rm -f core *$O regex.lib check.done tmp.script khadafy.out
  50.  
  51. # Some header file dependencies that really ought to be automatically deduced.
  52. grep$O search$O: grep.h
  53. dfa$O search$O: dfa.h
  54. kwset$O search$O: kwset.h
  55. kwset$O obstack$O: obstack.h
  56. regex$O search$O: regex.h
  57.