The -D
should be glued to the name (ie -DFOO
not -D FOO
)
gcc -c -std=c99 -Wall "-D$OPTIMIZE" -O2 code.c
and you forgot to pass -Wall
to gcc
. It is almost always useful.
BTW, you might consider (even for a single file) using make
with two phony targets: the default one (e.g. plain
), and an optimized
one.