4 # Copyright (C) 2017 Google, Inc
5 # Written by Simon Glass <sjg@chromium.org>
7 # SPDX-License-Identifier: GPL-2.0+
10 CFLAGS := -march=i386 -m32 -nostdlib -I ../../../include
12 LDS_UCODE := -T u_boot_ucode_ptr.lds
13 LDS_BINMAN := -T u_boot_binman_syms.lds
14 LDS_BINMAN_BAD := -T u_boot_binman_syms_bad.lds
16 TARGETS = u_boot_ucode_ptr u_boot_no_ucode_ptr bss_data \
17 u_boot_binman_syms u_boot_binman_syms.bin u_boot_binman_syms_bad \
18 u_boot_binman_syms_size
22 u_boot_no_ucode_ptr: CFLAGS += $(LDS_UCODE)
23 u_boot_no_ucode_ptr: u_boot_no_ucode_ptr.c
25 u_boot_ucode_ptr: CFLAGS += $(LDS_UCODE)
26 u_boot_ucode_ptr: u_boot_ucode_ptr.c
28 bss_data: CFLAGS += bss_data.lds
31 u_boot_binman_syms.bin: u_boot_binman_syms
32 objcopy -O binary $< -R .note.gnu.build-id $@
34 u_boot_binman_syms: CFLAGS += $(LDS_BINMAN)
35 u_boot_binman_syms: u_boot_binman_syms.c
37 u_boot_binman_syms_bad: CFLAGS += $(LDS_BINMAN_BAD)
38 u_boot_binman_syms_bad: u_boot_binman_syms_bad.c
40 u_boot_binman_syms_size: CFLAGS += $(LDS_BINMAN)
41 u_boot_binman_syms_size: u_boot_binman_syms_size.c
47 @echo "Makefile for binman test programs"
49 @echo "Intended for use on x86 hosts"
53 @echo -e "\thelp - Print help (this is it!)"
54 @echo -e "\tall - Builds test programs (default targget)"
55 @echo -e "\tclean - Delete output files"