aboutsummaryrefslogtreecommitdiff
path: root/targets/bbb/build/GNUmakefile
blob: 73dfad45a6e1b5a84176a4ee2763dbb4755db8c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export ARCH=arm
export CROSS_COMPILE=/opt/OSELAS.Toolchain-2014.12.1/arm-cortexa8-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/bin/arm-cortexa8-linux-gnueabihf-
export LOADADDR=80008000

VERSION = 3
PATCHLEVEL = 8

lastword = $(word $(words $(1)),$(1))
makedir := $(dir $(call lastword,$(MAKEFILE_LIST)))

ifeq ("$(origin V)", "command line")
VERBOSE := $(V)
endif
ifneq ($(VERBOSE),1)
Q := @
endif

MAKEARGS := -C ../linux
MAKEARGS += O=$(if $(patsubst /%,,$(makedir)),$(CURDIR)/)$(patsubst %/,%,$(makedir))

MAKEFLAGS += --no-print-directory

.PHONY: all $(MAKECMDGOALS)

all	:= $(filter-out all Makefile,$(MAKECMDGOALS))

ifeq ($(all),)
all:
	$(Q)$(MAKE) $(MAKEARGS) uImage dtbs
	rm ../linux/firmware/am335x-pm-firmware.bin
else
all:
	$(Q)$(MAKE) $(MAKEARGS) $(all)
	rm ../linux/firmware/am335x-pm-firmware.bin
endif

all: ../linux/firmware/am335x-pm-firmware.bin

../linux/firmware/am335x-pm-firmware.bin:
	cd ../linux && git checkout 3.8.13-bone74 firmware/am335x-pm-firmware.bin && git reset .

Makefile:;

$(all): all
	@:

%/: all
	@: