mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
26 lines
482 B
Makefile
26 lines
482 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
|
|
|
|
src = instrs.c decd.c main.c regs.c \
|
|
dump.c jumps.c
|
|
|
|
obj = $(patsubst %.c,%.o,$(src))
|
|
|
|
%.o: %.c instrs/i_arch.h */*.h $(src)
|
|
@gcc -O2 -Wall -I./karch -c $< -o $@
|
|
|
|
instrs/i_arch.h: INSTRS instrs.py
|
|
@python3 instrs.py
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
@rm *.o
|
|
|
|
k.exe: $(obj) i_arch.h INSTRS instrs.py
|
|
@gcc -O2 -Wall $(obj) -o ../k.exe
|
|
@rm *.o
|
|
|