added gentoo ebuilds
[libmixp.git] / libmixp / Makefile
blob87d45a0334bbdc395f162dec6087c62087d57445
2 SONAME=mixp
3 THREADLIB=pthread
5 include ../build.mk
7 OBJNAMES=client convert intmap message request socket transport util error rpc thread addr thread_$(THREADLIB) server
9 NOPIC_OBJ = $(addsuffix .nopic.o,$(OBJNAMES))
10 PIC_OBJ = $(addsuffix .pic.o,$(OBJNAMES))
12 PTHREAD_LIBS=`$(PKG_CONFIG) --libs libc-pthread`
13 PTHREAD_CFLAGS=`$(PKG_CONFIG) --cflags libc-pthread`
15 CFLAGS+=-I../include $(PTHREAD_CFLAGS)
16 LIBS+=$(PTHREAD_LIBS)
18 all: lib$(SONAME).a lib$(SONAME).so
20 lib$(SONAME).a:: $(NOPIC_OBJ)
22 lib$(SONAME).so:: $(PIC_OBJ)
24 install: lib$(SONAME).a lib$(SONAME).so
25 mkdir -p $(DESTDIR)$(LIBDIR)
26 cp lib$(SONAME).a lib$(SONAME).so $(DESTDIR)$(LIBDIR)
27 chmod ugo+x $(DESTDIR)$(LIBDIR)/lib$(SONAME).so
29 clean:
30 rm -f *.o *.a *.so