diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -9,7 +9,7 @@ PL_0_TEST_OBJECTS=PL0_utils.o svc.o PL0_test.o strings.o io.o LOADER_STAGE2_OBJECTS=uart.o strings.o io.o loader_stage2.o -RAMFS_FILES=PL_0_test.img +RAMFS_FILES=PL0_test.img all : kernel.img @@ -28,26 +28,24 @@ VPATH=$(src) %_embeddable.o : %.img arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm $^ $@ -PL_0_test.elf : PL0_test.ld $(PL_0_TEST_OBJECTS) - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(PL_0_TEST_OBJECTS) +%.elf : %.ld + arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(filter %.o,$^) -kernel_stage1.o : kernel_stage1.S kernel_stage2.img - arm-none-eabi-as -mcpu=cortex-a7 $< -o $@ +PL0_test.elf : $(PL_0_TEST_OBJECTS) -kernel.elf : kernel_stage1.ld kernel_stage1.o - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) kernel_stage1.o +kernel.elf : kernel_stage1.o -kernel_stage2.elf : kernel_stage2.ld $(KERNEL_STAGE2_OBJECTS) - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(KERNEL_STAGE2_OBJECTS) +kernel_stage2.elf : $(KERNEL_STAGE2_OBJECTS) -loader_stage2.elf : loader_stage2_linker.ld $(LOADER_STAGE2_OBJECTS) - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(LOADER_STAGE2_OBJECTS) +loader_stage2.elf : $(LOADER_STAGE2_OBJECTS) -loader_stage1.o : loader_stage1.S loader_stage2.img +loader.elf : loader_stage1.o + +kernel_stage1.o : kernel_stage1.S kernel_stage2.img arm-none-eabi-as -mcpu=cortex-a7 $< -o $@ -loader.elf : loader_stage1_linker.ld loader_stage1.o - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) loader_stage1.o +loader_stage1.o : loader_stage1.S loader_stage2.img + arm-none-eabi-as -mcpu=cortex-a7 $< -o $@ qemu-elf : kernel.elf qemu-system-arm -m 256 -M raspi2 -serial stdio -kernel $^ |