# makefile for AnimPlayer AAP	03.10.92		Aztec 5.0a
#
# this makefile assumes the assign AAP:
#
# --------------------------------------------------------------
# Directories:
# --------------------------------------------------------------

XDIR = AAP:
SDIR = AAP:src/
IDIR = AAP:src/
ODIR = AAP:obj/

# --------------------------------------------------------------
# Objects:
# --------------------------------------------------------------

OBJS = $(ODIR)AAP_MAIN.o  \
       $(ODIR)AAP_BODY.o      $(ODIR)AAP_DLTA.o

INC  = $(IDIR)AAP.h        $(IDIR)AAP_KEY.h

APINC = $(SDIR)AAP_GLOB.c  $(SDIR)AAP_PLAY.c

SYMS = $(ODIR)AAP.syms


# --------------------------------------------------------------
# Compileroptions:
# -pl .. int is 32 Bit long
# -bs .. info for debugger sdb
# -ho .. Write precompiled Symbolfile
# -hi .. Read precompiled Symbolfile
# -o $@  ... outputfile name = target


COMP = cc -pl -bs


# --------------------------------------------------------------
# Linkeroptions:
# +cdb .. force data+bss segment into CHIP_MEM
# -g   .. generate the .dbg file for sdb
# arp_libs: a.lib


$(XDIR)aap: $(OBJS)
      ln -g -o $@  $(OBJS) -lc


# ----------------------------
# Compiling the C-Sourcefiles
# ----------------------------

$(ODIR)AAP_MAIN.o: $(SDIR)AAP_MAIN.c  $(APINC)  $(SYMS)
	$(COMP) -hi$(SYMS) -I$(SDIR) -o $@  $(SDIR)AAP_MAIN.c

$(ODIR)AAP_BODY.o: $(SDIR)AAP_BODY.c $(SYMS)
	$(COMP) -hi$(SYMS) -o $@  $(SDIR)AAP_BODY.c

$(ODIR)AAP_DLTA.o: $(SDIR)AAP_DLTA.c $(SYMS)
	$(COMP) -hi$(SYMS) -o $@  $(SDIR)AAP_DLTA.c


# ----------------------------
# precompile of the Symbolfile
# ----------------------------

$(SYMS) : $(INC)
	$(COMP) -ho$(SYMS) -I$(IDIR) -O $(ODIR)dummy.o $(IDIR)AAP.h

