aboutsummaryrefslogtreecommitdiff
path: root/aarch64/el0_ns/Makefile
blob: 2409a1afae05a535bb8047a0319c0a502b315caf (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
EL0_NS_ELF		= tztest.elf
EL0_NS_IMAGE 	= tztest.bin
EL0_NS_LOAD		= tztest.lds
EL0_NS_OBJS		= tztest.o

-include .*.d

##################################################################

$(EL0_NS_ELF): $(EL0_NS_OBJS) $(EL0_NS_LOAD)
	$(LD) -fpic -pie -o $@ $(EL0_NS_OBJS) $(FLATLIBS) --script=$(EL0_NS_LOAD)

$(EL0_NS_IMAGE): $(EL0_NS_ELF)
	$(OBJCOPY) -O binary $< $@

$(EL0_NS_LOAD): tztest.lds.S Makefile ../../platform/$(PLAT)/
	$(CC) $(CFLAGS) -fpic -pie -E -P -C -o $@ $<

%.o: %.S
	$(CC) $(CFLAGS) -mcmodel=large -c -nostdlib -o $(notdir $@) $<

all: $(EL0_NS_IMAGE)

clean:
	$(RM) $(EL0_NS_OBJS) $(EL0_NS_LOAD) $(EL0_NS_ELF) $(EL0_NS_IMAGE) .*.d