DEPTH = $(shell find_depth)

include $(DEPTH)/make/swdefs

MISSING_SUBDIR = warning

LOCAL_TARGETS = DriverBuild

INST_DIR      = MonetInst/Packages/Drivers/Radeon/USB31_NV/amdhub/WinW764a
INST_TARGETS  = $(SPACE)

LOG_TARGET	=install_driver_SB_hseries_USB31_NV_amdhub_WinW764a
LOG_STREAMS	= $(LOG_ALL)

CA_PATH = $(BIN_DRIVE)/CA

PERL_BUILD_FILES=$(DEPTH)/install/Monet/Install/Utilities/Scripts/PerlApp

include $(DEPTH)/make/swrules

DriverBuild:
ifdef INST_PATH
	@$(DK_GNU)/bin/find.exe . -name "spacesaver.txt" -printf "\"%p\"\n" > files.lst
	@$(DK_GNU)/bin/echo.exe "Makefile" >> files.lst
	@$(DK_GNU)/bin/echo.exe "*.idt" >> files.lst
	@$(DK_GNU)/bin/echo.exe "*.tdi" >> files.lst
	@$(DK_GNU)/bin/echo.exe "*.exe" >> files.lst
	@$(DK_GNU)/bin/echo.exe "*.pl" >> files.lst
	@$(DK_GNU)/bin/echo.exe "*.inf" >> files.lst
	@$(DK_GNU)/bin/echo.exe "files.lst" >> files.lst
	@$(DK_GNU)/bin/mkdir.exe -p $(INST_DEST)
	@$(DK_GNU)/bin/cp.exe -Rfp * $(INST_DEST)/.
	@$(DK_GNU)/bin/cp.exe -Rfp $(CA_PATH)/Bin $(INST_DEST)
	$(DK_GNU)/bin/cp.exe -Rfp $(PERL_BUILD_FILES)/wiaddtbl.exe $(INST_DEST)
	@(cd $(INST_DEST); $(DK_GNU)/bin/chmod.exe -R 666 *; ./wiaddtbl.exe WinW764a.msi; \
	$(DK_GNU)/bin/cat.exe files.lst|$(DK_GNU)/bin/xargs $(DK_GNU)/bin/rm -rf; $(DK_GNU)/bin/rm -rf *.idt bin *.exe)
else
	@$(ECHO) Nothing to install
endif

LDIRT	= files.lst
	
