1
0
mirror of https://github.com/prirun/p50em.git synced 2026-01-11 23:42:56 +00:00

allow swapping C compilers via standard CC variable

This commit is contained in:
Ryan Blair 2020-04-13 18:43:29 +00:00
parent 5ef05d79b4
commit 4b399e22ca

View File

@ -6,19 +6,19 @@ REV=${shell [ -d .hg ] && hg id -n || git rev-parse --short HEAD}
em: # normal
rm -rf em.o
cc -DREV=\"${REV}\" -DNOTRACE -DFAST -O -Winline em.c -o em
$(CC) -DREV=\"${REV}\" -DNOTRACE -DFAST -O -Winline em.c -o em
emwarn: # lots of compiler warnings
rm -rf em.o
cc -DREV=\"${REV}\" -DNOTRACE -DFAST -O -Wall -Wextra -pedantic -Wconversion em.c -o em
$(CC) -DREV=\"${REV}\" -DNOTRACE -DFAST -O -Wall -Wextra -pedantic -Wconversion em.c -o em
debug: # gdb
rm -rf em.o
cc -DREV=\"${REV}\" -DNOTRACE -DFAST -g -O0 em.c -o em
$(CC) -DREV=\"${REV}\" -DNOTRACE -DFAST -g -O0 em.c -o em
trace: # tracing
rm -rf em.o
cc -DREV=\"${REV}\" -DFAST -O em.c -o em
$(CC) -DREV=\"${REV}\" -DFAST -O em.c -o em
# the fixed clock rate build is useful for making problems reproduceable.
#
@ -28,4 +28,4 @@ trace: # tracing
fixed: # fixed clock rate
rm -rf em.o
cc -DREV=\"${REV}\" -DFIXEDCLOCK -DNOIDLE -DFAST -O em.c -o em
$(CC) -DREV=\"${REV}\" -DFIXEDCLOCK -DNOIDLE -DFAST -O em.c -o em