home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / intercal.zip / src / Makefile < prev    next >
Makefile  |  1996-09-03  |  3KB  |  87 lines

  1. # Makefile for the INTERCAL compiler
  2.  
  3. # Set BINDIR, INCDIR, LIBDIR to the locations where you want "make install"
  4. # to install the executable, include files, and library for the compiler.
  5. # The compiler will look there for the stuff it needs when you compile
  6. # INTERCAL programs.  INCDIR and LIBDIR can be this directory if you don't
  7. # want to "make install", e.g., if you don't trust makefiles moving stuff
  8. # all over creation behind your back.
  9. # (/dev/null may be another good choice :-))
  10.  
  11. DVMT=/emx/intercal-0.15
  12.  
  13. BINDIR = $(DVMT)/bin
  14. INCDIR = $(DVMT)/lib
  15. LIBDIR = $(DVMT)/lib
  16. #INCDIR = $(PWD)
  17. #LIBDIR = $(PWD)
  18.  
  19. YDEBUG = -vlt
  20. DEBUG    = -g -DDEBUG
  21. # DEBUG = -O
  22. CFLAGS = -I. $(DEBUG) -DICKINCLUDEDIR=\"$(INCDIR)\" \
  23.     -DICKLIBDIR=\"$(LIBDIR)\" -DYYDEBUG -D__MT__
  24. LDFLAGS =
  25.  
  26. CC = gcc -Wall -W
  27.  
  28. # You can use lex or flex
  29. #LEX = lex
  30. LEX = flex
  31.  
  32. # You can use either yacc or bison
  33. #YACC = yacc
  34. YACC = bison -y
  35.  
  36. CSOURCES = ick.y lexer.l feh.c lose.c fiddle.c perpetrate.c
  37. ISOURCES = cesspool.c arrgghh.c ick-wrap.c
  38. HEADERS = ick.h lose.h sizes.h abcess.h fiddle.h feh.h
  39. SOURCES = $(CSOURCES) $(ISOURCES) $(HEADERS)
  40.  
  41. all: ick.exe libick.a
  42.  
  43. ick.exe: ick.o lexer.o feh.o lose.o fiddle.o perpetrate.o
  44.     $(CC) perpetrate.o ick.o lexer.o feh.o lose.o fiddle.o $(LDFLAGS) -o ick.exe
  45.  
  46. y.tab.h ick.c: ick.y ick.h sizes.h feh.h lose.h
  47.     $(YACC) -d $(YDEBUG) ick.y
  48.     mv y.tab.c ick.c
  49.  
  50. lexer.c: lexer.l ick.h lose.h
  51.     $(LEX) $(LFLAGS) lexer.l
  52.     mv lexyy.c lexer.c 
  53.  
  54. # Uncomment the following if using a stock lex
  55. # LEXLIBS = -ll
  56. lextest: y.tab.h lexer.c ick.h lose.o
  57.     $(CC) -DMAIN lexer.c lose.o $(LEXLIBS) -o lextest
  58.  
  59. ick.o: ick.c ick.h feh.h lose.h sizes.h
  60. lexer.o: lexer.c y.tab.h ick.h lose.h
  61. feh.o: feh.c feh.h y.tab.h ick.h fiddle.h lose.h sizes.h
  62. perpetrate.o: perpetrate.c y.tab.h ick.h lose.h sizes.h
  63. cesspool.o: cesspool.c numerals.c abcess.h lose.h sizes.h
  64. lose.o: lose.h
  65. fiddle.o: fiddle.h sizes.h
  66.  
  67. libick.a: cesspool.o lose.o fiddle.o arrgghh.o
  68.     ar cr libick.a cesspool.o lose.o fiddle.o arrgghh.o
  69.     ar s  libick.a
  70.  
  71. install: all
  72.     -mkdir $(BINDIR); rm -f $(BINDIR)/*
  73.     cp ick $(BINDIR)
  74.     -mkdir $(INCDIR)
  75.     (cd $(INCDIR); rm -f lose.h abcess.h fiddle.h ick-wrap.c)
  76.     cp lose.h abcess.h fiddle.h ick-wrap.c $(INCDIR)
  77.     -mkdir $(LIBDIR)
  78.     (cd $(LIBDIR); rm -f libick.a syslib.i)
  79.     cp libick.a ../pit/lib/syslib.i $(LIBDIR)
  80.     -ranlib $(LIBDIR)/libick.a
  81.  
  82. clean:
  83.     rm -f yacc.* y.tab.* y.output *~ *.[oa] lexer.c ick.c lextest ick
  84.  
  85. TAGS: $(SOURCES)
  86.     etags $(SOURCES)
  87.