2019-05-15 20:06:45 +02:00
|
|
|
# The OS/K Team licenses this file to you under the MIT license.
|
|
|
|
# See the LICENSE file in the project root for more information.
|
2019-05-15 19:26:40 +02:00
|
|
|
|
2019-05-15 21:47:08 +02:00
|
|
|
all: k.exe
|
|
|
|
|
2019-05-16 16:48:45 +02:00
|
|
|
src = instr/instrs.c karch/decd.c karch/main.c karch/regs.c karch/dump.c
|
2019-05-15 19:26:40 +02:00
|
|
|
obj = $(patsubst %.c,%.o,$(src))
|
|
|
|
|
2019-05-16 16:48:45 +02:00
|
|
|
%.o: %.c instrs/i_arch.h */*.h $(src)
|
2019-05-15 21:47:08 +02:00
|
|
|
@gcc -O2 -Wall -I./karch -c $< -o $@
|
|
|
|
|
|
|
|
instrs/i_arch.h: instr/INSTRS instr/instrs.py
|
|
|
|
@python3 instr/instrs.py
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm */*.o
|
2019-05-15 19:26:40 +02:00
|
|
|
|
2019-05-15 21:47:08 +02:00
|
|
|
k.exe: $(obj) instrs/i_arch.h instr/INSTRS instr/instrs.py
|
2019-05-15 19:26:40 +02:00
|
|
|
@gcc -O2 -Wall $(obj) -o k.exe
|
2019-05-15 21:47:08 +02:00
|
|
|
@rm */*.o
|
2019-05-15 19:26:40 +02:00
|
|
|
|