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