Files
onefinity-firmware/src/bbserial/Makefile
OneFinityCNC 24dfa6c64d Verison 1.0.3 Release
Based on Buildbotics 0.4.14
2020-08-27 23:20:27 -04:00

27 lines
626 B
Makefile

CROSS:=arm-linux-gnueabihf-
DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
obj-m:=bbserial.o
ccflags-y:=-std=gnu99 -Wno-declaration-after-statement
KPKG=raspberrypi-kernel_1.20171029-1.tar.gz
KURL=https://github.com/dbrgn/linux-rpi/archive/$(KPKG)
KDIR=linux-rpi-raspberrypi-kernel_1.20171029-1
export KERNEL=kernel7
KOPTS=ARCH=arm CROSS_COMPILE=$(CROSS) -C $(KDIR)
all: $(KDIR)
$(MAKE) $(KOPTS) M=$(DIR) modules
$(KDIR): $(KPKG)
tar xf $(KPKG)
$(MAKE) $(KOPTS) bcm2709_defconfig
$(MAKE) $(KOPTS) modules_prepare
$(KPKG):
wget $(KURL)
clean:
$(MAKE) $(KOPTS) M=$(DIR) clean
rm -rf $(KDIR) $(KPKG)