Merge pull request #161 from antonblanchard/hello-world-Makefile

hello_world: Use Makefile automatic variables
pull/163/head
Anton Blanchard 5 years ago committed by GitHub
commit 4c2bd76634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,13 +16,13 @@ LDFLAGS = -T powerpc.lds
all: hello_world.hex all: hello_world.hex


hello_world.elf: hello_world.o head.o console.o hello_world.elf: hello_world.o head.o console.o
$(LD) $(LDFLAGS) -o hello_world.elf hello_world.o head.o console.o $(LD) $(LDFLAGS) -o $@ $^


hello_world.bin: hello_world.elf hello_world.bin: hello_world.elf
$(OBJCOPY) -O binary hello_world.elf hello_world.bin $(OBJCOPY) -O binary $^ $@


hello_world.hex: hello_world.bin hello_world.hex: hello_world.bin
../scripts/bin2hex.py hello_world.bin > hello_world.hex ../scripts/bin2hex.py $^ > $@


clean: clean:
@rm -f *.o hello_world.elf hello_world.bin hello_world.hex @rm -f *.o hello_world.elf hello_world.bin hello_world.hex

Loading…
Cancel
Save