From 0def32e91a1c2628da92806c9af0a4e4d95f01ed Mon Sep 17 00:00:00 2001 From: julianb0 Date: Fri, 31 May 2019 20:00:06 +0200 Subject: [PATCH] make --- pc/Makefile | 15 +++++++++------ pc/disd.c | 6 ------ 2 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 pc/disd.c diff --git a/pc/Makefile b/pc/Makefile index 1e54f5f..320c5e4 100644 --- a/pc/Makefile +++ b/pc/Makefile @@ -3,17 +3,20 @@ all: k.exe -src = instrs/instrs.c decd.c main.c regs.c dump.c \ - instrs/jumps.c except.c disd.c mem.c instrs/logic.c \ +src = instrs/instrs.c main.c regs.c dump.c \ + instrs/jumps.c except.c decd.c mem.c instrs/logic.c \ instrs/stack.c instrs/super.c instrs/arith.c log.c \ instrs/debug.c instrs/mov.c -obj = $(patsubst %.c,%.o,$(src)) +obj = disd.o $(patsubst %.c,%.o,$(src)) CFLAGS=-O2 -g -Wall -fno-builtin-log +disd.o: i_arch.h *.h */*.h + @cc $(CFLAGS) -D_NEED_DISASM -c decd.c -o $@ + %.o: %.c i_arch.h *.h */*.h $(src) - @gcc $(CFLAGS) -c $< -o $@ + @cc $(CFLAGS) -c $< -o $@ i_arch.h: instrs/INSTRS instrs/arch_i.py @cd instrs && python3 arch_i.py @@ -21,9 +24,9 @@ i_arch.h: instrs/INSTRS instrs/arch_i.py .PHONY: clean clean: - @rm *.o + @rm *.o */*.o instrs/arch_i.h -k.exe: $(obj) i_arch.h +k.exe: i_arch.h $(obj) @gcc -O2 -Wall $(obj) -o k.exe @rm instrs/arch_i.h @rm *.o */*.o diff --git a/pc/disd.c b/pc/disd.c deleted file mode 100644 index 357e767..0000000 --- a/pc/disd.c +++ /dev/null @@ -1,6 +0,0 @@ -// The OS/K Team licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#define _NEED_DISASM -#include "decd.c" -