home *** CD-ROM | disk | FTP | other *** search
- #
- # MWC Makefile for MG (Atari ST)
- #
- # Marion Hakanson Jan '88
- #
- # Copy this file to "makefile" in the top level MG directory,
- # and make sure the atari stuff is in SYSDIR below. Then just
- # run "make" in the top level directory.
-
- # Warning: This makefile depends on having $(POUND) set to '#',
- # either on the make command line or in the shell environment.
- # Note that $(POUND) is a hack to get around the fact that
- # there is no way to put a literal "#" in a MWC make action.
- # I just put "setenv POUND '#'" in my PROFILE.
-
- SYSLIB = libsys.a
- SYSDIR = sys\atari
- LIBS = $(SYSDIR)\$(SYSLIB)
-
- # CDEFS gets defines, and gets passed to lint. CFLAGS gets flags,
- # and doesn't get passed to lint.
-
- CDEFS =
- CFLAGS = -O -DMWC $(CDEFS)
-
- # Objects which only depend on the "standard" includes
- OBJS = basic.o dir.o dired.o file.o line.o paragraph.o \
- random.o region.o version.o window.o word.o
-
- # Those with unique requirements
- IND = buffer.o display.o echo.o extend.o help.o kbd.o keymap.o \
- macro.o main.o match.o modes.o regex.o re_search.o search.o
-
- OBJ = $(OBJS) $(IND)
-
- SRCS = basic.c dir.c dired.c file.c line.c match.c paragraph.c \
- random.c region.c search.c version.c window.c word.c \
- buffer.c display.c echo.c extend.c help.c kbd.c keymap.c \
- macro.c main.c modes.c regex.c re_search.c
-
- OINCS = ttydef.h sysdef.h chrdef.h
- INCS = def.h
-
- all:
- cd $(SYSDIR); make -f makesys.mwc \
- "SYSLIB=$(SYSLIB)" "CFLAGS=$(CFLAGS)" $@
- make xmg.ttp
-
- xmg.ttp: $(OBJ) $(SYSDIR)\$(SYSLIB)
- $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
-
- # strip mg once you're satisfied it'll run -- makes it much smaller
- strip:
- strip xmg.ttp
-
-
- $(OBJS): $(INCS) $(OINCS)
-
- regex.o re_search.o: $(INCS) $(OINCS) regex.h
-
- extend.o help.o kbd.o: $(INCS) $(OINCS) macro.h kbd.h key.h
-
- main.o re_search.o search.o: $(INCS) $(OINCS) macro.h
-
- match.o: $(INCS) $(OINCS) key.h
-
- buffer.o display.o keymap.o modes.o: $(INCS) $(OINCS) kbd.h
-
- echo.o macro.o: $(INCS) $(OINCS) key.h macro.h
-
- echo.o: varargs.h
-
-
- sysdef.h: $(SYSDIR)\sysdef.h
- echo '$(POUND)include "$(SYSDIR)\sysdef.h"' > $@
-
- ttydef.h: $(SYSDIR)\ttydef.h
- echo '$(POUND)include "$(SYSDIR)\ttydef.h"' > $@
-
- chrdef.h: $(SYSDIR)\chrdef.h
- echo '$(POUND)include "$(SYSDIR)\chrdef.h"' > $@
-
- varargs.h: $(SYSDIR)\varargs.h
- echo '$(POUND)include "$(SYSDIR)\varargs.h"' > $@
-
-
- clean:
- cd $(SYSDIR); make -f makesys.mwc \
- "SYSLIB=$(SYSLIB)" "CFLAGS=$(CFLAGS)" $@
- -rm $(OBJ) $(OINCS) varargs.h xmg.ttp
-
-