Skip to content
Snippets Groups Projects
Makefile 484 B
CFLAGS += -Wall -Werror

# find our hammer build - adjust this to your needs
# i have, for instance, symlinks:
# hammer@ -> ../hammer/src
# lib@ -> ../hammer/build/opt/src
HAMMER_INCLUDE = .
HAMMER_LIB = ./lib
CFLAGS += -I$(HAMMER_INCLUDE)
LDFLAGS += -L$(HAMMER_LIB)

.PHONY: all test
all: pdf

test: pdf
	LD_LIBRARY_PATH=$(HAMMER_LIB) sh -c \
	'for x in t/*.pdf; do ./pdf "$$x" >/dev/null && echo OK: "$$x"; done'
	@true

pdf: pdf.c
	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $< -lhammer -lz