Makefile.ext 491 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
default: fetch

UNAME?=$(shell uname)

ifeq ($(UNAME),Darwin)
	LIBEXT=dylib
else
	LIBEXT=so
endif

all:
	make -C $(WORKDIR) $@

clean:
15
	-rm -fr $(WORKDIR)
16 17

distclean:
18
	-rm -fr $(TARBALL)
19

Jordan Sissel's avatar
Jordan Sissel committed
20
.PHONY: fetch
21 22
fetch: $(TARBALL)
$(TARBALL):
Jordan Sissel's avatar
Jordan Sissel committed
23
	fetch.sh -o $@ "$(URL)"
24 25 26 27 28 29 30 31 32 33 34

$(PREFIX)/lib $(PREFIX)/include:
	mkdir $@

workdir: $(WORKDIR)
$(WORKDIR): $(TARBALL)
	tar $(TARFLAGS) -xf $<

configure-autoconf: $(WORKDIR)/Makefile
$(WORKDIR)/Makefile: | $(WORKDIR)
	cd $(WORKDIR); ./configure --prefix=$(PREFIX)