Created
May 17, 2012 13:57
-
-
Save 17twenty/2719093 to your computer and use it in GitHub Desktop.
Makefile for Beaglebone (assuming environment already sourced from /opt/poky/<whatever>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Architecture | |
ARCH := arm | |
# We want to use the cross-compiler | |
CROSS_COMPILE := arm-poky-linux-gnueabi- | |
# Final object file | |
obj-m += simple.o | |
# Path of the ARM compiled kernel | |
ROOTDIR := /home/nick/Documents/BeagleBone/git-poky/Kernel/kernel_3.2.14_patched | |
# Tell make to take the architecture and cross-compiler in | |
MAKEARCH := $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) | |
all: modules | |
modules: | |
$(MAKEARCH) -C $(ROOTDIR) M=${shell pwd} modules | |
clean: | |
$(MAKEARCH) -C $(ROOTDIR) M=${shell pwd} clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment