mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
make
This commit is contained in:
parent
4f527e21aa
commit
0868c178bc
6
Makefile
6
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
|
||||
|
13
vm/Makefile
13
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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user