
KERNELDIR	:= $(INSTALL_ROOT)/linux

platform-objs += ../STM32F4xx_HAL_Driver/system_stm32f4xx.o
platform-objs += ../STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o
platform-objs += ../STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o
platform-objs += ../STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o
platform-objs += ../STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rng.o

platform-objs += platform_main.o

obj-m	+= platform.o

#APPDIR := $(INSTALL_ROOT)/projects/SP19017_OpticalFiber/app

EXTRA_CFLAGS += -I$(PWD)/../STM32F4xx_HAL_Driver
EXTRA_CFLAGS += -I$(PWD)/../STM32F4xx_HAL_Driver/Inc
EXTRA_CFLAGS += -I$(PWD)/../STM32F4xx_HAL_Driver/Inc/Legacy
EXTRA_CFLAGS += -I$(PWD)/../
EXTRA_CFLAGS += -I$(PWD)/../../common_include

modules	:
	make -C $(KERNELDIR) M=`pwd` modules CFLAGS="" LDFLAGS=""

clean:
	make -C $(KERNELDIR) M=`pwd` clean

