Simon Glass | 151ba36 | 2017-11-12 21:52:07 -0700 | [diff] [blame] | 1 | # |
| 2 | # Builds test programs |
| 3 | # |
| 4 | # Copyright (C) 2017 Google, Inc |
| 5 | # Written by Simon Glass <sjg@chromium.org> |
| 6 | # |
| 7 | # SPDX-License-Identifier: GPL-2.0+ |
| 8 | # |
| 9 | |
| 10 | CFLAGS := -march=i386 -m32 -nostdlib -I ../../../include |
| 11 | |
| 12 | LDS_UCODE := -T u_boot_ucode_ptr.lds |
| 13 | |
Simon Glass | 7f94e83 | 2017-11-12 21:52:25 -0700 | [diff] [blame^] | 14 | TARGETS = u_boot_ucode_ptr u_boot_no_ucode_ptr bss_data |
Simon Glass | 151ba36 | 2017-11-12 21:52:07 -0700 | [diff] [blame] | 15 | |
| 16 | all: $(TARGETS) |
| 17 | |
| 18 | u_boot_no_ucode_ptr: CFLAGS += $(LDS_UCODE) |
| 19 | u_boot_no_ucode_ptr: u_boot_no_ucode_ptr.c |
| 20 | |
| 21 | u_boot_ucode_ptr: CFLAGS += $(LDS_UCODE) |
| 22 | u_boot_ucode_ptr: u_boot_ucode_ptr.c |
| 23 | |
Simon Glass | 7f94e83 | 2017-11-12 21:52:25 -0700 | [diff] [blame^] | 24 | bss_data: CFLAGS += bss_data.lds |
| 25 | bss_data: bss_data.c |
| 26 | |
Simon Glass | 151ba36 | 2017-11-12 21:52:07 -0700 | [diff] [blame] | 27 | clean: |
| 28 | rm -f $(TARGETS) |
| 29 | |
| 30 | help: |
| 31 | @echo "Makefile for binman test programs" |
| 32 | @echo |
| 33 | @echo "Intended for use on x86 hosts" |
| 34 | @echo |
| 35 | @echo "Targets:" |
| 36 | @echo |
| 37 | @echo -e "\thelp - Print help (this is it!)" |
| 38 | @echo -e "\tall - Builds test programs (default targget)" |
| 39 | @echo -e "\tclean - Delete output files" |