linux_module_learn/device_model/Makefile

30 lines
509 B
Makefile
Raw Permalink Normal View History

2023-07-22 13:42:32 +08:00
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DDEBUG
endif
EXTRA_CFLAGS += $(DEBFLAGS)
KERNEL_DIR=../../ebf_6ull_linux
ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH CROSS_COMPILE
#xxx-objs := main.o pipe.o access.o
obj-m := my_bus.o my_device.o my_driver.o
all:
$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) modules
.PHONE:clean
clean:
$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) clean
#depend .depend dep:
# $(CC) $(EXTRA_CFLAGS) -M *.c > .depend
#ifeq (.depend,$(wildcard .depend))
#include .depend
#endif