home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gofer230.zip / Progs / Gofer / Src / Makefile next >
Makefile  |  1995-10-25  |  3KB  |  94 lines

  1. .SUFFIXES    : .y .c .h .o .gs
  2. OBJECTS        = storage.o input.o static.o type.o compiler.o
  3. IOBJECTS    = gofer.o builtin.o  machine.o output.o $(OBJECTS)
  4. COBJECTS    = gofc.o cbuiltin.o cmachine.o $(OBJECTS)
  5.  
  6. #----------------------------------------------------------------------------
  7. #
  8. # This file was chanced for compilation under OS/2 Warp with GCC+emx
  9. #
  10. # Michael Zimmermann, 18.Oct.95, MiZimm@pool.informatik.rwth-aachen.de
  11. #
  12. #----------------------------------------------------------------------------
  13.  
  14. # Edit the following settings as required.
  15. # There are two choices of command line editor that can be used with Gofer:
  16. #
  17. #  GNU readline:        usual GNU sources (e.g. bash distribution)
  18. #  add -DUSE_READLINE=1 to CFLAGS and libreadline.a -ltermcap to LDFLAGS
  19. #                      (or maybe -lreadline -ltermcap)
  20. #
  21. #  editline:            (comp.sources.misc, vol 31, issue 71)
  22. #  add -DUSE_READLINE=1 to CFLAGS and libedit.a to LDFLAGS
  23. #                      (or maybe -ledit)
  24. #
  25. # The best bet is to `touch prelude.h' after changing these settings to
  26. # ensure that the whole collection of files is recompiled with the correct
  27. # settings.
  28.  
  29. # IMPORTANT: make sure that you use the same compiler to build gofc
  30. # executables (often by setting an appropriate value in the gofcc script)
  31. # as you use to build the file runtime.o (as specified by the CC macro
  32. # below).
  33.  
  34. CC        = gcc
  35. #CFLAGS        = -DUSE_READLINE=1
  36. CFLAGS        = -Zexe
  37. LDFLAGS        = -lm
  38. OPTFLAGS    = -O
  39. OPT1        =
  40. #OPT1        = -O1
  41.  
  42. all        : gofer gofc runtime.o
  43.  
  44. gofer        : $(IOBJECTS)
  45.           $(CC) $(CFLAGS) $(OPTFLAGS) $(IOBJECTS) -o gofer $(LDFLAGS)
  46.           emxbind -s gofer.exe
  47.  
  48. gofc        : $(COBJECTS)
  49.           $(CC) $(CFLAGS) $(OPTFLAGS) $(COBJECTS) -o gofc $(LDFLAGS)
  50.           emxbind -s gofc.exe
  51.  
  52. .c.o        :
  53.           $(CC) -c $(CFLAGS) $(OPTFLAGS) $<
  54.  
  55. clean        :
  56.           -del *.o $(TESTS)
  57.  
  58. install        :
  59.           -move gofer.exe ..
  60.  
  61. .gs        :
  62.           ./gofc $*.gs
  63.           $(CC) $(OPTFLAGS) $*.c runtime.o -o $*.exe $(LDFLAGS)
  64.           -del $*.c
  65.           emxbind -s $*.exe
  66.  
  67. .gp        :
  68.           ./gofc + $*.gp
  69.           $(CC) $(OPTFLAGS) $*.c runtime.o -o $*.exe $(LDFLAGS)
  70.           -del $*.c
  71.           emxbind -s $*.exe
  72.  
  73. parser.c    : parser.y
  74.           yacc parser.y
  75.           -move y.tab.c parser.c
  76.  
  77. gofer.o        : prelude.h storage.h connect.h errors.h \
  78.           command.h machdep.c commonui.c
  79. gofc.o        : prelude.h storage.h connect.h errors.h \
  80.           command.h machdep.c commonui.c output.c
  81. runtime.o    : prelude.h gofc.h machdep.c markscan.c twospace.c
  82. storage.o    : prelude.h storage.h connect.h errors.h
  83. input.o        : prelude.h storage.h connect.h errors.h parser.c command.h
  84. static.o    : prelude.h storage.h connect.h errors.h scc.c
  85. type.o        : prelude.h storage.h connect.h errors.h preds.c kind.c subst.c
  86. output.o    : prelude.h storage.h connect.h errors.h
  87. compiler.o    : prelude.h storage.h connect.h errors.h
  88.           $(CC) -c $(OPT1) $(CFLAGS) compiler.c
  89. machine.o    : prelude.h storage.h connect.h errors.h
  90. cmachine.o    : prelude.h storage.h connect.h errors.h
  91.           $(CC) -c $(OPT1) $(CFLAGS) cmachine.c
  92. builtin.o    : prelude.h storage.h connect.h errors.h prims.c
  93. cbuiltin.o    : prelude.h storage.h connect.h errors.h prims.c
  94.