# Note: This makefile is a slightly modified version compared 
#       to the other ractrends drivers as this makefile builds
#       multiple modules in a single make (which is required as 
#       the i2c modules are highly interrelated and refers each 
#       others symbols)
TARGET := i2c-core.ko i2c-dev.ko i2c-boardinfo.ko 
OBJS := i2c-core.o i2c-dev.o i2c-boardinfo.o

EXTRA_CFLAGS += -I$(PWD)/../include -I$(PWD)/../../../../common/include/global 
EXTRA_CFLAGS += -I$(PWD)/../../../../common/include/i2c 
EXTRA_CFLAGS += -I$(PWD)/include -I$(PWD)/arch -I$(PWD)/drivers/i2c
EXTRA_CFLAGS += -Iibmc/include                                                                                                    
EXTRA_CFLAGS += -Wall -Werror
EXTRA_CFLAGS +=  -DI2C_EXTENDED_CMDS -DCONFIG_I2C_BOARDINFO

#---------------- Do not modify any thing below this line ------------------------

# Include projdef.h (Note : Here TOPDIR points to linux directory)
#EXTRA_CFLAGS += -include $(TOPDIR)/../projdef.h

ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DDEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif
EXTRA_CFLAGS += $(DEBFLAGS)

obj-$(CONFIG_IBMC_I2C) := $(OBJS)

