home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / makefile.gre < prev    next >
Makefile  |  1990-05-07  |  861b  |  43 lines

  1. #
  2. # Makefile for GNU e?grep
  3. #
  4.  
  5. # Add -DUSG for System V.
  6. CFLAGS = -O
  7.  
  8. #
  9. # You may add getopt.o if your C library lacks getopt(); note that
  10. # 4.3BSD getopt() is said to be somewhat broken.
  11. #
  12. # Add alloca.o if your machine does not support alloca().
  13. #
  14. OBJS = dfa.o regex.o
  15. GOBJ = grep.o
  16. EOBJ = egrep.o
  17.  
  18. # Space provided for machine dependent libraries.
  19. LIBS =
  20.  
  21. all: regress
  22.  
  23. regress: egrep grep
  24.     cd tests; sh regress.sh
  25.  
  26. egrep: $(OBJS) $(EOBJ)
  27.     $(CC) $(CFLAGS) -o egrep $(OBJS) $(EOBJ) $(LIBS)
  28.  
  29. egrep.o: grep.c
  30.     rm -f egrep.c; cp grep.c egrep.c
  31.     $(CC) $(CFLAGS) -DEGREP -c egrep.c
  32.     rm -f egrep.c
  33.  
  34. grep: $(OBJS) $(GOBJ)
  35.     $(CC) $(CFLAGS) -o grep $(OBJS) $(GOBJ) $(LIBS)
  36.  
  37. clean:
  38.     rm -f grep egrep *.o core tests/core tests/tmp.script \
  39.     tests/khadafy.out egrep.c
  40.  
  41. dfa.o egrep.o grep.o: dfa.h
  42. egrep.o grep.o regex.o: regex.h
  43.