test: test.o textio.so makefile
	gcc -O2 -nostdlib -nostartfiles -o test test.o ./textio.so
	strip --strip-all test

textio.so: textio.asm pic.mac makefile
	nasm -felf textio.asm
	ld -shared -o textio.so textio.o

test.o: test.asm pic.mac makefile
	nasm -felf -otest.o test.asm