1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/vm/Makefile
2019-06-05 12:53:09 +02:00

33 lines
673 B
Makefile

# The OS/K Team licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
all: k.exe
.PHONY: clean
.INTERMEDIATE: %.o
in_src = $(shell ls in/*.c)
pc_src = $(shell ls pc/*.c)
obj = disd.o $(patsubst %.c,%.o,$(pc_src)) $(patsubst %.c,%.o,$(in_src))
FLAGS=-O2 -g -Wall -fno-builtin-log -I.
disd.o: i_arch.h */*.h pc/decd.c
@cc $(FLAGS) -D_NEED_DISASM -c pc/decd.c -o $@
%.o: %.c i_arch.h */*.h $(src)
@cc $(FLAGS) -c $< -o $@
i_arch.h: in/INSTRS in/arch_i.py
@cd in && python3 arch_i.py
clean:
@rm -f */*.o in/arch_i.h
k.exe: i_arch.h $(obj)
@gcc -O2 -Wall $(obj) -o k.exe
@rm in/arch_i.h
@rm -f */*.o