Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions lesson-8-Character-Devices/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# mpu6050 accelerometer & gyroscope
#
ifneq ($(KERNELRELEASE),)

obj-m := mpu6050.o

else


ifeq ($(KERNELDIR),)
ifeq ($(BBB_KERNEL),)
$(error Path to kernel tree - KERNELDIR or BBB_KERNEL variable is not defined!)
endif
endif

KERNELDIR ?= $(BBB_KERNEL)

export ARCH = arm
export CROSS_COMPILE ?= arm-linux-gnueabihf-


.PHONY: all clean dtb

all:
$(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules

clean:
$(MAKE) -C $(KERNELDIR) M=$(CURDIR) clean

dtb:
cp am335x-bone-common.dtsi $(KERNELDIR)/arch/arm/boot/dts/
$(MAKE) -C $(KERNELDIR) M=$(CURDIR) dtbs


endif
Loading