1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
PKG_CONFIG ?= pkg-config
CFLAGS = -std=c99 $(shell $(PKG_CONFIG) --cflags unibilium termkey tickit) -DHAVE_UNIBILIUM
LDFLAGS = $(shell $(PKG_CONFIG) --libs unibilium termkey tickit)
LIBTOOL = ./libtool
TESTSOURCES = $(sort $(wildcard t/[0-9]*.c))
TESTFILES = $(TESTSOURCES:.c=.t)
configure: configure.ac
LIBTOOLIZE='libtoolize -i' autoreconf -f -i
libtool: configure
./configure
t/%.lo: t/%.c | libtool
$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $^
t/%.t: t/%.lo t/taplib.lo t/mockterm.lo t/taplib-tickit.lo | libtool
$(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^ $(LDFLAGS)
.PHONY: test
test: $(TESTFILES)
$(LIBTOOL) --mode=execute prove -e ''
|