1 CONFIG_TEST_RAW_TP := n
2 CONFIG_ENABLE_MONITOR_PROCESS = n
5 CROSS_COMPILE := /usr/bin/arm-linux-gnueabihf-
7 KERNEL := /lib/modules/$(shell uname -r)/build
11 #Default interface is sdio
12 MODULE_NAME=esp32_sdio
14 #enable logging by default
15 CONFIG_DEBUG_LOGS := y
17 #Targets passed overrrides default value
18 ifeq ($(target), sdio)
19 MODULE_NAME=esp32_sdio
26 ifeq ($(CONFIG_ENABLE_MONITOR_PROCESS), y)
27 EXTRA_CFLAGS += -DCONFIG_ENABLE_MONITOR_PROCESS
30 ifeq ($(CONFIG_INFO_LOGS), y)
31 EXTRA_CFLAGS += -DCONFIG_INFO_LOGS
34 ifeq ($(CONFIG_DEBUG_LOGS), y)
35 EXTRA_CFLAGS += -DCONFIG_INFO_LOGS
36 EXTRA_CFLAGS += -DCONFIG_DEBUG_LOGS
39 ifeq ($(CONFIG_TEST_RAW_TP), y)
40 EXTRA_CFLAGS += -DCONFIG_TEST_RAW_TP
43 EXTRA_CFLAGS += -I$(PWD)/include -I$(PWD)
45 ifeq ($(MODULE_NAME), esp32_sdio)
46 EXTRA_CFLAGS += -I$(PWD)/sdio
47 module_objects += sdio/esp_sdio.o sdio/esp_sdio_api.o
50 ifeq ($(MODULE_NAME), esp32_spi)
51 EXTRA_CFLAGS += -I$(PWD)/spi
52 module_objects += spi/esp_spi.o
57 obj-m := $(MODULE_NAME).o
58 $(MODULE_NAME)-y := esp_bt.o main.o esp_cmd.o esp_wpa_utils.o esp_cfg80211.o esp_stats.o $(module_objects)
61 make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) M=$(PWD) modules
64 rm -rf *.o sdio/*.o spi/*.o *.ko
65 make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) M=$(PWD) clean