I have a specific problem with my Makefile.
With this command, I can compile all my * .c files into * .o, which work well:
$(OBJ) : %.o : %.c $(LDSCRIPT) Makefile $(CC) $(ARM9_INCLUDES) -c $(CFLAGS) $< -o $@
But now I'm wondering what to do if I want to start -O3 optimization for only one separate file and leave -O0 on the rest?
Is there any command to add another rule for a specific file?
What I am doing right now is each C file with its own rules, which is very annoying because I have about 30 files, which makes the Makefile huge, and every time I change something in one file, it again compiles EVERYTHING.
source share