home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume30 / rc / part06 / Makefile < prev    next >
Encoding:
Makefile  |  1992-05-30  |  1.7 KB  |  66 lines

  1. # Makefile for rc.
  2.  
  3. # Please check the configuration parameters in config.h (and if you want
  4. # to make sure, the definitions in proto.h) to make sure they are correct
  5. # for your system.
  6.  
  7. SHELL=/bin/sh
  8.  
  9. # Uncomment this line if you have defined the NOEXECVE macro in config.h
  10. #EXECVE=execve.o
  11.  
  12. # Define this macro if you wish to extend rc via locally-defined builtins.
  13. # An interface is provided in addon.[ch]. Note that the author does not
  14. # endorse any such extensions, rather hopes that this way rc will become
  15. # useful to more people.
  16. #ADDON=addon.o
  17.  
  18. # Use an ANSI compiler (or at least one that groks prototypes and void *):
  19. CC=gcc -g -O
  20. CFLAGS=
  21. LDFLAGS=
  22.  
  23. # You may substitute "bison -y" for yacc. (You want to choose the one that
  24. # makes a smaller y.tab.c.)
  25. YACC=yacc
  26.  
  27. OBJS=$(ADDON) builtins.o except.o exec.o $(EXECVE) fn.o footobar.o getopt.o \
  28.     glob.o glom.o hash.o heredoc.o input.o lex.o list.o main.o match.o \
  29.     nalloc.o open.o print.o redir.o sigmsgs.o signal.o status.o tree.o \
  30.     utils.o var.o version.o wait.o walk.o which.o y.tab.o
  31.  
  32. # If rc is compiled with READLINE defined, you must supply the correct
  33. # arguments to ld on this line. Typically this would be something like:
  34. #
  35. #    $(CC) -o $@ $(OBJS) -lreadline -ltermcap
  36.  
  37. rc: $(OBJS)
  38.     $(CC) -o $@ $(OBJS) $(LDFLAGS)
  39.  
  40. sigmsgs.c: mksignal
  41.     sh mksignal /usr/include/sys/signal.h
  42.  
  43. y.tab.c: parse.y
  44.     $(YACC) -d parse.y
  45.  
  46. config.h: config.h-dist
  47.     cp config.h-dist config.h
  48.  
  49. trip: rc
  50.     ./rc -p < trip.rc
  51.  
  52. clean: force
  53.     rm -f *.o *.tab.* sigmsgs.*
  54.  
  55. history: force
  56.     cd history; make CC="$(CC)" $(HISTORYMAKEFLAGS)
  57.  
  58. force:
  59.  
  60. # dependencies:
  61.  
  62. $(OBJS): config.h
  63. sigmsgs.h: sigmsgs.c
  64. lex.o y.tab.o: y.tab.c
  65. builtins.c fn.c status.c hash.c: sigmsgs.h
  66.