add first pypowersim example
[openpower-isa.git] / src / test / basic_pypowersim / Makefile
1 TOOLCHAIN=powerpc64-linux-gnu
2 CC=$(TOOLCHAIN)-gcc
3 AS=$(TOOLCHAIN)-as
4 AFLAGS=-mpwr9
5
6 all: sim
7
8 sim: kernel.bin
9 pypowersim -i kernel.bin
10
11 clean:
12 rm *.o *.elf *.bin
13
14 kernel.elf: test.o
15 $(TOOLCHAIN)-ld $^ -EL -o $@ -T memmap
16
17 kernel.bin: kernel.elf
18 $(TOOLCHAIN)-objcopy $< -I elf64-little -O binary $@
19
20 %.o: %.s
21 $(AS) $(AFLAGS) -c $< -le -o $@