summaryrefslogtreecommitdiff
path: root/support/pdfbook/Makefile
blob: 873f38920aa88e604bbd06bf48e5fbc5f0adf77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Simple makefile to build pdfbook executable and zipfile.

CFLAGS=-Wall -g -O2

TARGET=pdfbook

default: build

build: $(TARGET)

dist: $(TARGET).zip

$(TARGET): %: %.c

$(TARGET).zip: %.zip: %.c Makefile README
	TEMPDIR=`mktemp -d` CURDIR=`pwd` && ln -s $$CURDIR $$TEMPDIR/$(TARGET) && \
	( cd $$TEMPDIR && zip $$CURDIR/$@ $(addprefix $(TARGET)/,$^) ) && \
	rm -rf $$TEMPDIR

clean:
	rm -f $(TARGET) $(TARGET).zip

.PHONY: default build dist clean