test_libc_fxlib/Makefile

14 lines
617 B
Makefile

all: main.c main.ld crt0.s icon.bmp
mkdir -p build/
sh3eb-elf-gcc -c crt0.s -o build/crt0.o -m3 -mb -ffreestanding -Iinclude -O2 -std=c11 -nostdlib
sh3eb-elf-gcc -c main.c -o build/main.o -m3 -mb -ffreestanding -Iinclude -O2 -std=c11 -nostdlib
sh3eb-elf-gcc -o build/main.elf build/crt0.o build/main.o -m3 -mb -ffreestanding -Iinclude -O2 -std=c11 -nostdlib -Tmain.ld -Llib -lm -lc -lgcc
sh3eb-elf-objcopy -R .comment -R .bss -O binary build/main.elf build/main.bin
g1a-wrapper build/main.bin -o build/main.g1a -i icon.bmp
upload: all
cd build; CasioUsbUploader -w -f main.g1a; cd ..
clean:
rm -rfv build/