Skip to content

Commit

Permalink
Tooling: improvement to makefile to prevent unnecessary recompilation
Browse files Browse the repository at this point in the history
  • Loading branch information
vipoo committed Apr 11, 2020
1 parent 7c226e5 commit eb0f302
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ rc2014-6303: rc2014-6303.o 6800.o ide.o w5100.o ppide.o rtc_bitbang.o
rc2014-6502: rc2014-6502.o 6502.o 6502dis.o ide.o w5100.o
cc -g3 rc2014-6502.o ide.o w5100.o 6502.o 6502dis.o -o rc2014-6502

rc2014-65c816-mini: rc2014-65c816-mini.o ide.o w5100.o
rc2014-65c816-mini: rc2014-65c816-mini.o ide.o w5100.o lib65c816/src/lib65816.a
cc -g3 rc2014-65c816-mini.o ide.o w5100.o lib65c816/src/lib65816.a -o rc2014-65c816-mini

rc2014-65c816-mini.o: rc2014-65c816-mini.c
$(MAKE) --directory lib65c816 && \
lib65c816/src/lib65816.a:
$(MAKE) --directory lib65c816

rc2014-65c816-mini.o: rc2014-65c816-mini.c lib65c816/src/lib65816.a
$(CC) $(CFLAGS) -Ilib65c816 -c rc2014-65c816-mini.c

rc2014-68008: rc2014-68008.o ide.o w5100.o m68k/lib68k.a
Expand Down
10 changes: 5 additions & 5 deletions libz80/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
SOURCES = z80.c
FLAGS = -Wall -ansi -g -c

force: clean all
FLAGS = -Wall -ansi -g -c

all: libz80.o

libz80.o: z80.h $(OBJS)
libz80.o: z80.c z80.h
cd codegen && make opcodes
gcc $(FLAGS) -o libz80.o $(SOURCES)
$(CC) $(FLAGS) -o libz80.o $(SOURCES)

.PHONY: clean
clean:
rm -f *.o core
cd codegen && make clean

.PHONY: realclean
realclean: clean
rm -rf doc

Expand Down

0 comments on commit eb0f302

Please sign in to comment.