Files
openwrt-master/target/linux/gemini/image/copy-kernel/Makefile
domenico c06fb25d1f
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 14:35:53 +02:00

39 lines
839 B
Makefile

#
# Makefile for Gemin kernel copy stub
#
# Copyright (C) 2019 Linus Walleij <linus.walleij@linaro.org>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
AS := $(CROSS_COMPILE)as
OBJCOPY := $(CROSS_COMPILE)objcopy
BIN_FLAGS := -O binary -S
SRC_DIR := $(CURDIR)/
OUT_DIR := $(if $(O),$(if $(patsubst %/,,$(O)),$(O)/,$(O)),$(SRC_DIR))
all: $(OUT_DIR)copy-kernel.bin
# Don't build dependencies, this may die if $(CC) isn't gcc
dep:
install:
$(OUT_DIR):
mkdir -p $(OUT_DIR)
$(OUT_DIR)%.o : $(SRC_DIR)%.S | $(OUT_DIR)
$(AS) $(ASFLAGS) -k -o $@ $<
$(OUT_DIR)%.bin: $(OUT_DIR)%.o
$(OBJCOPY) $(BIN_FLAGS) $< $@
mrproper: clean
clean:
rm -f $(OUT_DIR)copy-kernel.bin $(OUT_DIR)copy-kernel.o