# Makefile for Rend386 demo program
# created by Jerry Isdale, April 1993
# This is somewhat different from the official Rend386 system
# I have set it up for BCC, moved some files to the demo.lib area
# and made some minor fixes to some source modules.


INCDIR = ./include
CC = bcc
CFLAGS = -ml -I$(INCDIR)
LFLAGS = -ml

######################################################
demo4.exe: demo4.obj supp.lib sega.lib userint.lib rend386.lib
  $(CC) $(LFLAGS) demo4.obj supp.lib sega.lib userint.lib rend386.lib

rend386.lib:
	cd int
	make
	cd ..

userint.lib:
	cd userint
	make
	cd ..

sega.lib:
	cd sega
	make
	cd ..

supp.lib:
	cd supp
	make
	cd ..

demo4.obj: demo4.c $(INCDIR)\rend386.h $(INCDIR)\userint.h \
   $(INCDIR)\plg.h $(INCDIR)\segasupp.h $(INCDIR)\segio.h \
   $(INCDIR)\tasks.h $(INCDIR)\splits.h $(INCDIR)\pointer.h \
   $(INCDIR)\intmath.h $(INCDIR)\cursor.h

######################################################
clean:
        del *.obj
        cd int
        make clean
        cd ..\userint
        make clean
        cd ..\sega
        make clean
        cd ..\supp
        make clean
        cd ..

######################################################
zip:
        -del devel.zip
        pkzip -P devel makefile *.bat *.c include\*.h 
        pkzip -P devel int\*.c int\*.h int\*.asm int\makefile
        pkzip -P devel sega\*.c sega\*.asm sega\makefile 
        pkzip -P devel supp\*.c supp\makefile userint\*.c userint\makefile
        pkzip -P devel doc\*.* test\*.*

