#------------------------------------------------------------------------------
#	makefile
#------------------------------------------------------------------------------

.SILENT :

TARGET	= $(TARGET)

build:
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Cubes
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Modtest01
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=QuikTest
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=QTDirect
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Reload01
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Rendtx02
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Rendtx03
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Txtest01
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Txtest02
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Txtest03
        $(MAKE) /$(MAKEFLAGS) build_project TARGET=Txtest05

build_project:
	echo Building...$(TARGET)
	cd .\$(TARGET)
	$(MAKE) /$(MAKEFLAGS) /f$(TARGET).mak
        MakeData
	cd ..

clean:
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Cubes
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Modtest01
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=QuikTest
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=QTDirect
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Reload01
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Rendtx02
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Rendtx03
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Txtest01
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Txtest02
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Txtest03
        $(MAKE) /$(MAKEFLAGS) clean_project TARGET=Txtest05

clean_project:
	echo Cleaning...$(TARGET)
	cd .\$(TARGET)
	$(MAKE) /$(MAKEFLAGS) /f$(TARGET).mak clean
        del exe\*.pvr
	cd ..