added gentoo ebuilds
[libmixp.git] / build.mk
blob146b1a05e7581a392dfaabe156a2693499820318
2 # Author(s): Enrico Weigelt, metux IT services <weigelt@metux.de>
5 VERSION=3.6.2
6 PREFIX?=/usr
7 LIBDIR?=$(PREFIX)/lib
8 INCLUDEDIR?=$(PREFIX)/include
9 PKGCONFIGDIR?=$(LIBDIR)/pkgconfig
10 PKG_CONFIG?=pkg-config
11 AR?=ar
12 RANLIB?=ranlib
13 CFLAGS+=-Wall
15 %.pc: %.pc.in
16 cat $< | \
17 sed -e 's~@VERSION@~$(VERSION)~' | \
18 sed -e 's~@PREFIX@~$(PREFIX)~' | \
19 sed -e 's~@LIBDIR@~$(LIBDIR)~' | \
20 sed -e 's~@INCLUDEDIR@~$(INCLUDEDIR)~' > $@
22 %.a:
23 $(AR) cr $@ $^ && $(RANLIB) $@
25 %.so:
26 $(LD) -o $@ -shared $^ -soname $(SONAME) -lc -no-undefined $(LIBS)
28 %.nopic.o: %.c
29 $(CC) -o $@ -c $< $(CFLAGS)
31 %.pic.o: %.c
32 $(CC) -fpic -o $@ -c $< $(CFLAGS)