datasize = 3 # how many 64k chunks reserved in .bss for data
testapp: postforth
	cd samples && ../postforth hello.4th && ./hello
postforth: pfkern
	./pfkern postforth.4th
pfkern: pf
	./pf pfkern.4th
pf: f
	./f < pf.4th
f: f.o
	ld -o f f.o
	./fixup f 0x4c 7 # change r-x to rwx for .text section
	./fixup f 0x6a $(datasize) # change bss_size from zero to whatever
	./fixup f 0x6c 7 # change rw- to rwx for .bss section
f.o: f.s
	as --defsym DATASIZE=$(datasize) -o f.o f.s
clean:
	rm -f f.list f.o core
distclean: clean
	rm -f f pf hello pfkern postforth samples/hello
distribution: distclean
	cd .. && tar cvfz postforth.tgz postforth
commit:
	bzr commit
	#bzr launchpad-login jcomeau
	bzr push
