4 # Copyright (C) 2017 Google, Inc
5 # Written by Simon Glass <sjg@chromium.org>
7 # SPDX-License-Identifier: GPL-2.0+
11 CFLAGS := -march=i386 -m32 -nostdlib -I ../../../include
13 LDS_UCODE := -T u_boot_ucode_ptr.lds
14 LDS_BINMAN := -T u_boot_binman_syms.lds
15 LDS_BINMAN_BAD := -T u_boot_binman_syms_bad.lds
17 TARGETS = u_boot_ucode_ptr u_boot_no_ucode_ptr bss_data \
18 u_boot_binman_syms u_boot_binman_syms.bin u_boot_binman_syms_bad \
19 u_boot_binman_syms_size
23 u_boot_no_ucode_ptr: CFLAGS += $(LDS_UCODE)
24 u_boot_no_ucode_ptr: u_boot_no_ucode_ptr.c
26 u_boot_ucode_ptr: CFLAGS += $(LDS_UCODE)
27 u_boot_ucode_ptr: u_boot_ucode_ptr.c
29 bss_data: CFLAGS += $(SRC)bss_data.lds
32 u_boot_binman_syms.bin: u_boot_binman_syms
33 objcopy -O binary $< -R .note.gnu.build-id $@
35 u_boot_binman_syms: CFLAGS += $(LDS_BINMAN)
36 u_boot_binman_syms: u_boot_binman_syms.c
38 u_boot_binman_syms_bad: CFLAGS += $(LDS_BINMAN_BAD)
39 u_boot_binman_syms_bad: u_boot_binman_syms_bad.c
41 u_boot_binman_syms_size: CFLAGS += $(LDS_BINMAN)
42 u_boot_binman_syms_size: u_boot_binman_syms_size.c
48 @echo "Makefile for binman test programs"
50 @echo "Intended for use on x86 hosts"
54 @echo -e "\thelp - Print help (this is it!)"
55 @echo -e "\tall - Builds test programs (default targget)"
56 @echo -e "\tclean - Delete output files"