aboutsummaryrefslogtreecommitdiff
path: root/bbl/bbl.mk.in
blob: 17e85216085df4177d785f93c26b992a9e6166a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# See LICENSE for license details.

bbl_subproject_deps = \
	util \
  softfloat \
  machine \

bbl_hdrs = \
  bbl.h \

bbl_c_srcs = \
  logo.c \

bbl_asm_srcs = \
  raw_logo.S \

ifeq (@BBL_PAYLOAD@,dummy_payload)
bbl_subproject_deps += \
  dummy_payload
endif

ifneq (@BBL_PAYLOAD@,no)
bbl_asm_srcs += \
  payload.S

payload.o: bbl_payload

bbl_payload: $(BBL_PAYLOAD)
	if $(READELF) -h $< 2> /dev/null > /dev/null; then $(OBJCOPY) -O binary --set-section-flags .bss=alloc,load,contents $< $@; else cp $< $@; fi
endif

raw_logo.o: bbl_logo_file

ifeq (@BBL_ENABLE_LOGO@,1)
bbl_logo_file: @BBL_LOGO_FILE@
	cat $^ | sed 's/$$/\r/' > $@
else
bbl_logo_file:
	touch $@
endif

bbl_test_srcs =

bbl_install_prog_srcs = \
  bbl.c \

bbl.bin: bbl
	$(OBJCOPY) -S -O binary --change-addresses -@MEM_START@ $< $@

bbl_extra_targets = bbl.bin