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-07 22:23:38 +02:00

37 lines
772 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
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,%.o,$(dv_src))
obj += $(patsubst %.c,%.o,$(in_src))
obj += $(patsubst %.c,%.o,$(pc_src))
FLAGS=-O2 -g -Wall -fno-builtin-log -I.
#pc/disd.o: in/i_arch.h */*.h pc/decd.c
# @cc $(FLAGS) -D_NEED_DISASM -c pc/decd.c -o $@
%.o: %.c in/i_arch.h */*.h $(src)
@cc $(FLAGS) -c $< -o $@
in/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: in/i_arch.h $(obj)
@gcc -O2 -Wall $(obj) -o k.exe
@rm in/arch_i.h
@rm -f */*.o