gemini: Add copy-kernel utility package
[openwrt/staging/dedeckeh.git] / target / linux / gemini / image / copy-kernel / Makefile
1 #
2 # Makefile for Gemin kernel copy stub
3 #
4 # Copyright (C) 2019 Linus Walleij <linus.walleij@linaro.org>
5 #
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License version 2 as published
8 # by the Free Software Foundation.
9 #
10
11 AS := $(CROSS_COMPILE)as
12 OBJCOPY := $(CROSS_COMPILE)objcopy
13
14 BIN_FLAGS := -O binary -S
15
16 all: copy-kernel.bin
17
18 # Don't build dependencies, this may die if $(CC) isn't gcc
19 dep:
20
21 install:
22
23 %.o : %.S
24 $(AS) $(ASFLAGS) -k -o $@ $<
25
26 %.bin: %.o
27 $(OBJCOPY) $(BIN_FLAGS) $< $@
28
29 mrproper: clean
30
31 clean:
32 rm -f copy-kernel.bin copy-kernel.o