
#   Makefile for DRES.LIBRARY,	    AZTEC C 3.6a
#
#   NOTE:   You must have previously create the directory 'local' in your
#	    C include's directory and placed the distribution include/local
#	    directory there.  The libref program must also have been compiled

SYMS=	include:symbols.m
SYMC=	include:local/makesymbols.c
CFLAGS= +BCDLp +I$(SYMS)
LREXE=	srcc:libref

SRC0=	library.c
SRC1=	libtag.asm
SRC2=	/src/misc.c
SRC3=	/src/qint.asm
SRC4=	/src/lists.asm
SRC5=	/src/mem.asm
SRC6=	/src/timedate.c
SRC7=	/src/ipc.c
SRC8=	/src/res.c

OBJ0=	vd0:library.o
OBJ1=	vd0:libtag.o
OBJ2=	vd0:misc.o
OBJ3=	vd0:qint.o
OBJ4=	vd0:lists.o
OBJ5=	vd0:mem.o
OBJ6=	vd0:timedate.o
OBJ7=	vd0:ipc.o
OBJ8=	vd0:res.o

OBJS=	$(OBJ0) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7)

all:  $(SYMS) $(LREXE) hlib $(OBJS)
    ln	+Q $(OBJS) -ldres -lcl32 -o libs:dres.library

hlib:
    libref
    assign this: /core
    cd ram:
    make
    cd this:
    assign this:

$(OBJ0): $(SRC0)
    cc	$(CFLAGS) $(SRC0) -o $(OBJ0)

$(OBJ1): $(SRC1)
    as	$(SRC1) -o $(OBJ1)

$(OBJ2): $(SRC2)
    cc	$(CFLAGS) $(SRC2) -o $(OBJ2)

$(OBJ3): $(SRC3)
    as	$(SRC3) -o $(OBJ3)

$(OBJ4): $(SRC4)
    as	$(SRC4) -o $(OBJ4)

$(OBJ5): $(SRC5)
    as	$(SRC5) -o $(OBJ5)

$(OBJ6): $(SRC6)
    cc $(CFLAGS) $(SRC6) -o $(OBJ6)

$(OBJ7): $(SRC7)
    cc $(CFLAGS) $(SRC7) -o $(OBJ7)

$(OBJ8): $(SRC8)
    cc $(CFLAGS) $(SRC8) -o $(OBJ8)

$(SYMS):    $(SYMC)
    make -f include:local/Makefile

$(LREXE):   /libref.c
    cc +L +I$(SYMS) /libref.c -o T:libref.o
    ln +Q T:libref.o -lsup32 -lc32 -o $(LREXE)
    delete T:libref.o

