# $URL: http://subversion:8080/svn/gsc/trunk/drivers/LINUX/HPDI32/HPDI32_Linux_2.x.x.x_GSC_DN/driver/Makefile $
# $Rev: 13494 $
# $Date: 2011-12-20 16:31:56 -0600 (Tue, 20 Dec 2011) $

# Makefile for the HPDI32 driver.

TARGET		:= hpdi32

OBJ_FILES	=					\
			close.o				\
			device.o			\
			io.o				\
			ioctl.o				\
			irq.o				\
			open.o				\
			read.o				\
			reg.o				\
			write.o				\
								\
			gsc_bar.o			\
			gsc_close.o			\
			gsc_dma.o			\
			gsc_init.o			\
			gsc_io.o			\
			gsc_ioctl.o			\
			gsc_irq.o			\
			gsc_kernel_2_2.o	\
			gsc_kernel_2_4.o	\
			gsc_kernel_2_6.o	\
			gsc_open.o			\
			gsc_proc.o			\
			gsc_read.o			\
			gsc_reg.o			\
			gsc_sem.o			\
			gsc_time.o			\
			gsc_wait.o			\
			gsc_write.o



default: all

###############################################################################
# Everything here is needed so we can access gsc_makefile.inc.

.EXPORT_ALL_VARIABLES:

# Locate the source from the starting directory.
ifndef GSC_DEV_DIR
GSC_DEV_DIR	:= ${PWD}
endif

# Locate the GSC common sources.
ifndef GSC_DIR

GSC_COMMON	:= $(shell ls -d ../../../gsc_common/linux/driver 2>/dev/null | wc -l )

ifeq ("${GSC_COMMON}","1")

GSC_DIR		:= ${GSC_DEV_DIR}/../../../gsc_common/linux/driver

${GSC_DEV_DIR}/gsc_makefile.inc: ${GSC_DIR}/gsc_makefile.inc
	@echo == Getting: $@
	@rm -f $@
	@cp $< .
	@chmod 444 $@

else
GSC_DIR		:= ${GSC_DEV_DIR}
endif

endif

include ${GSC_DEV_DIR}/gsc_makefile.inc

