#
#        Makefile for Gadgets (Aztec C v5.2a)
#
# Macros
#
#DEFINES    =-dMWDEBUG
DEFINES    =
CFLAGS_PRE =-a -ms -pacs0t -so -wdelopqw -ho ram:gadgets.pre
CFLAGS_TEST=$(DEFINES) -ms -pacs0t -so -wdelopqw -hi ram:gadgets.pre
CFLAGS_LIB =$(DEFINES) -mbs -pacs0t -so -wdelopqw -hi ram:gadgets.pre
LFLAGS     =-m +q
INCLUDES   =/render/render.h /borders/borders.h /texts/texts.h\
 /language/language.h /pointer/pointer.h gadgets.h imports.h
OBJECTS    =gadgets1.o gadgets2.o gadgets3.o gadgets4.o gadgets_test.o\
 /render/render.o /texts/texts.o /borders/borders.o /requester/requester.o\
 /files/files.o /language/language.o /pointer/pointer.o
#LIBRARIES  =-lmemwatch16 -lc16
LIBRARIES  =-lc16
#
# Dependancy entries
#
all: ram:gadgets.pre gadgets_test clear
#
.c.o:
   cc $(CFLAGS_LIB) -o $@ $*.c
#
ram:gadgets.pre: gadgets.pre
   copy gadgets.pre $@ clone
#
gadgets.pre: includes.h
   cc $(CFLAGS_PRE) -o nil: includes.h
   copy ram:$@ $@ clone
#
gadgets_test: $(OBJECTS)
   ln $(LFLAGS) -o $@ $(OBJECTS) $(LIBRARIES)
#
gadgets_test.o: gadgets_test.c $(INCLUDES)
   cc $(CFLAGS_TEST) -o $@ $*.c
#
gadgets1.o: gadgets1.c $(INCLUDES)
   cc $(CFLAGS_LIB) -o $@ $*.c
#
gadgets2.o: gadgets2.c $(INCLUDES)
   cc $(CFLAGS_LIB) -o $@ $*.c
#
gadgets3.o: gadgets3.c $(INCLUDES)
   cc $(CFLAGS_LIB) -o $@ $*.c
#
clear:
   delete ram:#?.pre
#
