From 0868c178bc4bc88b33bacac37ae967f962abee47 Mon Sep 17 00:00:00 2001 From: julianb0 Date: Thu, 13 Jun 2019 22:52:10 +0200 Subject: [PATCH] make --- Makefile | 6 ------ vm/Makefile | 13 +++++-------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 2546594..7b1f952 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,10 @@ all: kas kpc: - @rm -f vm/a.out @cd vm && make --no-print-directory verbose=no kas: kpc as/k-as.py as/regs.lst @cp vm/in/instrs.lst as - @rm -f vm/in/instrs.lst DOSK = $(shell find ka -name '*.k') @@ -17,7 +15,6 @@ vm/a.out: $(DOSK) @cd ka && ../as/k-as.py dos.k 0x100000 ../vm/a.out .PHONY: clean - clean: @cd vm && make clean @rm -f vm/a.out vm/k.exe vm/stdout.txt as/instrs.lst @@ -32,6 +29,3 @@ test: kas vm/a.out @echo "<<<<<<<<" @echo -disasm: kas vm/a.out - @vm/k.exe vm/a.out -d - @mv fwprog.dis vm diff --git a/vm/Makefile b/vm/Makefile index 872184a..0ae0bf1 100644 --- a/vm/Makefile +++ b/vm/Makefile @@ -11,7 +11,6 @@ dv_src = $(shell ls dv/*.c) in_src = $(shell ls in/*.c) pc_src = $(shell ls pc/*.c) -#obj = pc/disd.o obj = $(patsubst %.c,$(OBJDIR)/%.o,$(dv_src)) obj += $(patsubst %.c,$(OBJDIR)/%.o,$(in_src)) obj += $(patsubst %.c,$(OBJDIR)/%.o,$(pc_src)) @@ -28,16 +27,13 @@ NC='\033[1;37m' all: k.exe -#pc/disd.o: in/i_arch.h */*.h pc/decd.c -# @cc $(FLAGS) -D_NEED_DISASM -c pc/decd.c -o $@ - -include $(dep) $(OBJDIR)/%.o: %.c @mkdir -p $(shell dirname $@) @cc $(FLAGS) -c $< -o $@ - @if [ $(verbose) = "yes" ]; then \ - echo ${CL2}[$@] ${CL}dependencies generated.${CL3};\ + @if true || [ $(verbose) = "yes" ]; then \ + echo ${CL2}[$@] ${CL}object file generated.${CL3};\ fi $(OBJDIR)/%.d: %.c @@ -47,13 +43,14 @@ $(OBJDIR)/%.d: %.c echo ${CL2}[$@] ${CL}dependencies generated.${CL3};\ fi -in/i_arch.h: in/INSTRS in/arch_i.py +in/instrs.lst: in/INSTRS in/arch_i.py @cd in && python3 arch_i.py clean: @rm -f $(OBJDIR)/*/*.o in/arch_i.h @rm -f $(OBJDIR)/*/*.d -k.exe: in/i_arch.h $(obj) +k.exe: in/instrs.lst $(obj) @gcc -O2 -Wall $(obj) -o k.exe @echo ${CL2}[$@] ${CL}made successfully.${CL3} +