1
0
mirror of https://github.com/ggambetta/libz80.git synced 2025-04-18 18:44:02 +03:00

Replace gcc in makefiles with $(CC)

This commit allows other compilers besides gcc.

N.B. the "-ansi" flag is not supported in tcc, so this flag is
replaced with "-std=c89", which produces the same behavior as
"-ansi" in gcc and does not cause problems with tcc.
This commit is contained in:
Dustin Rawlings 2020-07-22 19:02:22 -10:00
parent c412822135
commit 7b0882e607
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
SOURCES = z80.c
FLAGS = -fPIC -Wall -ansi -g
FLAGS = -fPIC -Wall -std=c89 -g
force: clean all
@ -7,7 +7,7 @@ all: libz80.so
libz80.so: z80.h $(OBJS)
cd codegen && make opcodes
gcc $(FLAGS) -shared -o libz80.so $(SOURCES)
$(CC) $(FLAGS) -shared -o libz80.so $(SOURCES)
install:
install -m 666 libz80.so /usr/lib

View File

@ -1,7 +1,7 @@
all: mktables
mktables: mktables.c
gcc -g -o mktables mktables.c
$(CC) -g -o mktables mktables.c
force: clean opcodes

View File

@ -11,4 +11,4 @@ tests.expected: fuse_files/tests.expected
./generate_expected.sh $< $@
coretest: coretest.c
gcc -Wall -ansi -g -o $@ $< ../libz80.so
$(CC) -Wall -std=c89 -g -o $@ $< ../libz80.so