2019-05-16 19:59:14 +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.
|
|
|
|
|
|
|
|
all: k.exe
|
|
|
|
|
2019-05-16 20:09:20 +02:00
|
|
|
src = instrs.c decd.c main.c regs.c dump.c jumps.c
|
2019-05-16 19:59:14 +02:00
|
|
|
|
|
|
|
obj = $(patsubst %.c,%.o,$(src))
|
|
|
|
|
2019-05-16 20:09:20 +02:00
|
|
|
%.o: %.c i_arch.h *.h $(src)
|
|
|
|
@gcc -O2 -Wall -c $< -o $@
|
2019-05-16 19:59:14 +02:00
|
|
|
|
2019-05-16 20:09:20 +02:00
|
|
|
i_arch.h: INSTRS instrs.py
|
2019-05-16 19:59:14 +02:00
|
|
|
@python3 instrs.py
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm *.o
|
|
|
|
|
|
|
|
k.exe: $(obj) i_arch.h INSTRS instrs.py
|
2019-05-16 20:09:20 +02:00
|
|
|
@gcc -O2 -Wall $(obj) -o k.exe
|
2019-05-16 19:59:14 +02:00
|
|
|
@rm *.o
|
|
|
|
|