#
# BCC2GRX  -  Interfacing Borland based graphics programs to LIBGRX
# Copyright (C) 1993-96 by Hartmut Schirmer
#
# This library is copyrighted (see above). It might be used and
# distributed freely as long as all copyright notices are left
# intact.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Contact :                Hartmut Schirmer
#                          Feldstrasse 118
#                  D-24105 Kiel
#                          Germany
#
# e-mail : hsc@techfak.uni-kiel.d400.de
#
# makefile: Main makefile, set up for GNU-make
#

BASE = .

include makedefs

all     : bcc2grx_all      test_all
clean   : bcc2grx_clean    test_clean
cleanall: bcc2grx_cleanall test_cleanall lib_cleanall
cleantmp: bcc2grx_cleanfnt test_cleantmp

lib: lib2
lib103:
	$(MAKE) BCC_USER_CONF=DONE -C src -f $(SUBMAKEF) BASE=.. all
libx:
	$(MAKE) BCC_USER_CONF=DONE GRX2=GRX20 -C src -f $(SUBMAKEF) BASE=.. all
lib2:
	$(MAKE) BCC_USER_CONF=DONE GRX2=GRX20 DJGPP2=TRUE -C src -f $(SUBMAKEF) BASE=.. all
test:   test_all

bcc2grx_all:
	$(MAKE) -C src -f $(SUBMAKEF) BASE=.. all

bcc2grx_clean:
	$(MAKE) -C src -f $(SUBMAKEF) BASE=.. clean

bcc2grx_cleanall:
	$(MAKE) -C src -f $(SUBMAKEF) BASE=.. cleanall

bcc2grx_cleanfnt:
	$(MAKE) -C src -f $(SUBMAKEF) BASE=.. cleanfnt

test_all:
	$(MAKE) -C test -f $(SUBMAKEF) BASE=.. all

test_clean:
	$(MAKE) -C test -f $(SUBMAKEF) BASE=.. clean

test_cleanall:
	$(MAKE) -C test -f $(SUBMAKEF) BASE=.. cleanall

test_cleantmp:
	$(MAKE) -C test -f $(SUBMAKEF) BASE=.. cleantmp

lib_cleanall:
	$(MAKE) -C lib -f $(SUBMAKEF) BASE=.. cleanall

distrib_beta: cleantmp
	cd ..\\..
	del bcc2grx.zip
	pkzip -ex -P -r bcc2grx.zip contrib\\bcc2grx\\*.* -x*.o -x*.a -x*.exe -x*.bak -x*.dsk -x*.prj
	unzip -l bcc2grx.zip >manifest\\bccgrx20.mft
	pkzip -ex -P bcc2grx.zip manifest\\bccgrx20.mft
	cd contrib\\bcc2grx
