2024-06-29 13:11:47 -04:00
|
|
|
ID=uxncore
|
|
|
|
DIR=~/roms
|
|
|
|
ASM=uxncli ${DIR}/drifblim.rom
|
|
|
|
LIN=uxncli ${DIR}/uxnlin.rom
|
|
|
|
EMU=uxncli
|
|
|
|
ROM=bin/${ID}.rom
|
|
|
|
|
2024-06-29 23:51:37 -04:00
|
|
|
all: ${ROM}
|
2024-06-29 13:11:47 -04:00
|
|
|
|
|
|
|
lint:
|
|
|
|
@ ${LIN} src/${ID}.tal
|
|
|
|
run: all
|
2024-06-29 23:51:37 -04:00
|
|
|
@ ${EMU} ${ROM} > src/core.c
|
2024-06-29 23:54:39 -04:00
|
|
|
@ cat src/a.c src/core.c src/b.c > bin/main.c
|
|
|
|
@ cc bin/main.c -o bin/main && ./bin/main
|
|
|
|
@ rm ./bin/*
|
2024-06-29 13:11:47 -04:00
|
|
|
clean:
|
|
|
|
@ rm -f ${ROM} ${ROM}.sym
|
|
|
|
install: ${ROM}
|
|
|
|
@ cp ${ROM} ${DIR}
|
|
|
|
uninstall:
|
|
|
|
@ rm -f ${DIR}/${ID}.rom
|
|
|
|
|
2024-06-29 23:10:10 -04:00
|
|
|
.PHONY: all clean lint run install uninstall
|
|
|
|
|
2024-06-29 13:11:47 -04:00
|
|
|
${ROM}: src/*
|
|
|
|
@ mkdir -p bin
|
|
|
|
@ ${ASM} src/${ID}.tal ${ROM}
|