libtool-cross 2.2.6[ab]: Drop legacy staging, taken from poky
[openembedded.git] / recipes / pf_ring / libpfring / libpfring-makefile-fixes.patch
blob721f904b178fcd7d6cd371d0a3e3910ecf78926d
1 Index: Makefile
2 ===================================================================
3 --- Makefile.orig 2010-08-02 17:31:55.000000000 +0400
4 +++ Makefile 2010-08-03 12:56:31.000000000 +0400
5 @@ -8,7 +8,7 @@
7 # Installation directory
9 -INSTDIR = ${DESTDIR}/usr/local
10 +INSTDIR = ${DESTDIR}/usr
13 # Search directories
14 @@ -29,6 +29,8 @@
16 # C compiler and flags
18 +AR = ar
19 +RANLIB = ranlib
20 CC = gcc
21 CFLAGS = -g -O2 -Wall -fPIC ${INCLUDE} ${DNA_DEFINE}
22 LDFLAGS = -shared
23 @@ -44,26 +46,29 @@
24 # Main targets
26 STATICLIB = libpfring.a
27 -DYNAMICLIB = libpfring.so
28 +DYNAMICLIB = libpfring.so.0.0.1
29 TARGETS = ${STATICLIB} ${DYNAMICLIB}
30 RING_H = ../../kernel/linux/pf_ring.h
32 all: ${TARGETS}
34 -${STATICLIB}: Makefile ${OBJS} pfring.h ${RING_H}
35 +${STATICLIB}: Makefile ${OBJS} pfring.h
36 @echo "=*= making library $@ =*="
37 - ar rs $@ ${OBJS}
38 - ranlib $@
39 + ${AR} rs $@ ${OBJS}
40 + ${RANLIB} $@
42 -${DYNAMICLIB}: ${OBJS} pfring.h ${RING_H} Makefile
43 +${DYNAMICLIB}: ${OBJS} pfring.h Makefile
44 @echo "=*= making library $@ =*="
45 - ${CC} ${LDFLAGS} ${OBJS} ${SYSLIBS} -o $@
46 + ${CC} ${LDFLAGS} ${OBJS} ${SYSLIBS} -Wl,-soname,libpfring.so.0 -o $@
48 install: ${STATICLIB} ${DYNAMICLIB}
49 + install -d ${INSTDIR}/lib
50 + install -d ${INSTDIR}/include
51 cp ${STATICLIB} ${INSTDIR}/lib/
52 cp ${DYNAMICLIB} ${INSTDIR}/lib/
53 + ln -sf ${DYNAMICLIB} ${INSTDIR}/lib/libpfring.so.0
54 + ln -sf ${DYNAMICLIB} ${INSTDIR}/lib/libpfring.so
55 cp pfring_e1000e_dna.h pfring.h ${INSTDIR}/include/
56 - ldconfig
58 clean:
59 @rm -f ${TARGETS} *.o *~