I'm trying to obtain the assembler code generated out of my .C files by GCC.
The aim is to understand how my C code is translated into ASM and maybe find some way to optimize certain critical parts of my code.
The "stackoverflow" thread here mentions the -S option, that works when used in a single command line.
However, I'd like to use it on my whole project, when it is built by the SGDK's makefile.
I tried this compilation flags in 'makefile.gen' :
Code: Select all
release: FLAGS= $(DEFAULT_FLAGS) -S -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer
Code: Select all
D:/apps/dev/sgdk/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -ID:/apps/dev/sgdk/inc -ID:/apps/dev/sgdk/res -BD:/apps/dev/sgdk/bin -S -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -c src/boot/rom_head.c -o out/rom_head.o
D:/apps/dev/sgdk/bin/ld -T D:/apps/dev/sgdk/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
out/rom_head.o: file not recognized: File format not recognized
make: *** [out/rom_head.bin] Error 1
I'm probably doing something stupid...