mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
30 lines
642 B
Makefile
30 lines
642 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/instrs.c decd.c main.c regs.c dump.c \
|
|
instrs/jumps.c except.c disd.c mem.c instrs/logic.c \
|
|
instrs/stack.c instrs/super.c instrs/arith.c log.c
|
|
|
|
obj = $(patsubst %.c,%.o,$(src))
|
|
|
|
CFLAGS=-O2 -g -Wall -fno-builtin-log
|
|
|
|
%.o: %.c i_arch.h *.h $(src)
|
|
@gcc $(CFLAGS) -c $< -o $@
|
|
|
|
i_arch.h: instrs/INSTRS instrs/arch_i.py
|
|
@cd instrs && python3 arch_i.py
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
@rm *.o
|
|
|
|
k.exe: $(obj) i_arch.h
|
|
@gcc -O2 -Wall $(obj) -o k.exe
|
|
@rm instrs/arch_i.h
|
|
@rm *.o */*.o
|
|
|