util  makefile at [6f480eda3f]

File kpw.d/makefile artifact 0ee772709b part of check-in 6f480eda3f


include ../makerules

cdeps = compose.c iaia.c tbl.c
cpaths = $(cdeps:%=$(root)/clib/%)

$(root)/kpw: kpw.c opt.inc err.inc $(cpaths)
	$(cc) -I$(root) $< -lsodium -o $@ $(flags) $(cc-post)

tab = cat $< | awk -v emit=$1 -F'\t+' -f $<.awk >> $@

opt.inc: optab optab.awk
	:>$@
	$(call tab,cond)
	$(call tab,enum)
	$(call tab,argtbl)
	$(call tab,olong)
	$(call tab,oshort)
	$(call tab,usage)

err.inc: errtab errtab.awk
	:>$@
	$(call tab,enum)
	$(call tab,msg)
	
.PHONY: dbg