# $URL: http://subversion:8080/svn/gsc/trunk/drivers/LINUX/18AI32SSC1M/driver/Makefile $
# $Rev: 13277 $
# $Date: 2011-12-19 17:33:37 -0600 (Mon, 19 Dec 2011) $

# Makefile for the 18AI32SSC1M driver.

TARGET		:= 18ai32ssc1m

OBJ_FILES	=					\
			close.o				\
			device.o			\
			io.o				\
			ioctl.o				\
			irq.o				\
			open.o				\
			read.o				\
			reg.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_vpd.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

