ifeq ($(KERNEL_DEBUGGER),y) EXTRA_CFLAGS += -g -O2 endif ifeq ($(DEBUG),y) EXTRA_CFLAGS += -DSDIO_DEBUG -O2 else EXTRA_CFLAGS += -O2 endif -include ../../../Rules.make # If KERNEL_DIR is not set then use the default in Rules.make KERNEL_DIR ?= ${LINUXKERNEL_INSTALL_DIR} DEST_DIR ?= ${DESTDIR} PLATFORM ?= "unknown" MACHINE_NAME ?= "unknown" # Use the PLATFORM value from the Rules.make if it was sourced ifeq ($(PLATFORM), am335x-evm) MACHINE_NAME := "am335x" endif ifeq ($(PLATFORM), am180x-evm) MACHINE_NAME := "am1808" endif ifeq ($(PLATFORM), da850-omapl138-evm) MACHINE_NAME := "am1808" endif ifeq ($(PLATFORM), am37x-evm) MACHINE_NAME := "omap3evm" endif # If CROSS_COMPILE is not set by Rules.make then set a sane default CROSS_COMPILE ?= arm-arago-linux-gnueabi- export CROSS_COMPILE # set the INSTALL_MOD_DIR so that the executables won't be placed in extra INSTALL_MOD_DIR = kernel/drivers/bt_enable export INSTALL_MOD_DIR obj-m := gpio_en.o MAKE_ENV = ARCH=arm PWD := $(shell pwd) all: @cp -f gpio_en_${MACHINE_NAME}.c gpio_en.c $(MAKE) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" -C $(KERNEL_DIR) $(MAKE_ENV) \ M=$(PWD) modules install: $(MAKE) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" -C $(KERNEL_DIR) $(MAKE_ENV) \ M=$(PWD) INSTALL_MOD_PATH="${DEST_DIR}" modules_install clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.symvers