home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / EDITOR / MG2A_SRC.ZIP / SYS / ATARI / MAKETOP.MWC < prev    next >
Encoding:
Text File  |  1988-08-23  |  2.5 KB  |  92 lines

  1. #
  2. # MWC Makefile for MG (Atari ST)
  3. #
  4. #    Marion Hakanson        Jan '88
  5. #
  6. # Copy this file to "makefile" in the top level MG directory,
  7. # and make sure the atari stuff is in SYSDIR below.  Then just
  8. # run "make" in the top level directory.
  9.  
  10. # Warning:  This makefile depends on having $(POUND) set to '#',
  11. # either on the make command line or in the shell environment.
  12. # Note that $(POUND) is a hack to get around the fact that
  13. # there is no way to put a literal "#" in a MWC make action.
  14. # I just put "setenv POUND '#'" in my PROFILE.
  15.  
  16. SYSLIB    = libsys.a
  17. SYSDIR  = sys\atari
  18. LIBS    = $(SYSDIR)\$(SYSLIB)
  19.  
  20. # CDEFS gets defines, and gets passed to lint. CFLAGS gets flags,
  21. # and doesn't get passed to lint.
  22.  
  23. CDEFS    = 
  24. CFLAGS    = -O -DMWC $(CDEFS)
  25.  
  26. # Objects which only depend on the "standard" includes
  27. OBJS    = basic.o dir.o dired.o file.o line.o paragraph.o \
  28.       random.o region.o version.o window.o word.o
  29.  
  30. # Those with unique requirements
  31. IND    = buffer.o display.o echo.o extend.o help.o kbd.o keymap.o \
  32.       macro.o main.o match.o modes.o regex.o re_search.o search.o
  33.  
  34. OBJ = $(OBJS) $(IND)
  35.  
  36. SRCS    = basic.c dir.c dired.c file.c line.c match.c paragraph.c \
  37.       random.c region.c search.c version.c window.c word.c \
  38.       buffer.c display.c echo.c extend.c help.c kbd.c keymap.c \
  39.       macro.c main.c modes.c regex.c re_search.c
  40.  
  41. OINCS =    ttydef.h sysdef.h chrdef.h
  42. INCS =    def.h
  43.  
  44. all:
  45.     cd $(SYSDIR); make -f makesys.mwc \
  46.         "SYSLIB=$(SYSLIB)" "CFLAGS=$(CFLAGS)" $@
  47.     make xmg.ttp
  48.  
  49. xmg.ttp:    $(OBJ) $(SYSDIR)\$(SYSLIB)
  50.     $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
  51.  
  52. # strip mg once you're satisfied it'll run -- makes it much smaller
  53. strip:
  54.     strip xmg.ttp
  55.  
  56.  
  57. $(OBJS):    $(INCS) $(OINCS)
  58.  
  59. regex.o re_search.o:    $(INCS) $(OINCS) regex.h
  60.  
  61. extend.o help.o kbd.o:    $(INCS) $(OINCS) macro.h kbd.h key.h
  62.  
  63. main.o re_search.o search.o:    $(INCS) $(OINCS) macro.h
  64.  
  65. match.o:    $(INCS) $(OINCS) key.h
  66.  
  67. buffer.o display.o keymap.o modes.o:    $(INCS) $(OINCS) kbd.h
  68.  
  69. echo.o macro.o:    $(INCS) $(OINCS) key.h macro.h
  70.  
  71. echo.o:    varargs.h
  72.  
  73.  
  74. sysdef.h: $(SYSDIR)\sysdef.h
  75.     echo '$(POUND)include "$(SYSDIR)\sysdef.h"' > $@
  76.  
  77. ttydef.h: $(SYSDIR)\ttydef.h
  78.     echo '$(POUND)include "$(SYSDIR)\ttydef.h"' > $@
  79.  
  80. chrdef.h: $(SYSDIR)\chrdef.h
  81.     echo '$(POUND)include "$(SYSDIR)\chrdef.h"' > $@
  82.  
  83. varargs.h: $(SYSDIR)\varargs.h
  84.     echo '$(POUND)include "$(SYSDIR)\varargs.h"' > $@
  85.  
  86.  
  87. clean:
  88.     cd $(SYSDIR); make -f makesys.mwc \
  89.         "SYSLIB=$(SYSLIB)" "CFLAGS=$(CFLAGS)" $@
  90.     -rm $(OBJ) $(OINCS) varargs.h xmg.ttp
  91.  
  92.