#
#        Makefile for Text Files (Aztec C v5.2a)
#
# Macros
#
#DEFINES    =-dMWDEBUG
DEFINES    =
CFLAGS_PRE =-a -ms -pacs0t -so -wdelopqw -ho ram:files.pre
CFLAGS_TEST=$(DEFINES) -ms -pacs0t -so -wdelopqw -hi ram:files.pre
CFLAGS_LIB =$(DEFINES) -mbs -pacs0t -so -wdelopqw -hi ram:files.pre
LFLAGS     =-m +q
INCLUDES   =/render/render.h files.h
OBJECTS    =files.o files_test.o
#LIBRARIES  =-lmemwatch16 -lc16
LIBRARIES  =-lc16
#
# Dependancy entries
#
all: ram:files.pre files_test clear
#
ram:files.pre: files.pre
   copy files.pre $@ clone
#
files.pre: includes.h
   cc $(CFLAGS_PRE) -o nil: includes.h
   copy ram:$@ $@ clone
#
files_test: $(OBJECTS)
   ln $(LFLAGS) -o $@ $(OBJECTS) $(LIBRARIES)
#
files_test.o: files_test.c $(INCLUDES)
   cc $(CFLAGS_TEST) -o $@ $*.c
#
files.o: files.c $(INCLUDES)
   cc $(CFLAGS_LIB) -o $@ $*.c
#
clear:
   delete ram:#?.pre
#
