Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libexecinfo / 30-linux-makefile.patch
blob134c64441d3667673306415a307a73d7d706625f
1 --- Makefile.orig
2 +++ Makefile
3 @@ -23,24 +23,25 @@
4 # SUCH DAMAGE.
6 # $Id: Makefile,v 1.3 2004/07/19 05:19:55 sobomax Exp $
7 +#
8 +# Linux Makefile by Matt Smith <mcs@darkregion.net>, 2011/01/04
10 -LIB= execinfo
11 +CC=cc
12 +AR=ar
13 +EXECINFO_CFLAGS=$(CFLAGS) -O2 -pipe -fno-strict-aliasing -std=gnu99 -c
14 +EXECINFO_LDFLAGS=$(LDFLAGS)
16 -SRCS= stacktraverse.c stacktraverse.h execinfo.c execinfo.h
17 +all: static dynamic
19 -INCS= execinfo.h
20 +static:
21 + $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c
22 + $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c
23 + $(AR) rcs libexecinfo.a stacktraverse.o execinfo.o
25 -SHLIB_MAJOR= 1
26 -SHLIB_MINOR= 0
27 +dynamic:
28 + $(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c -o stacktraverse.So
29 + $(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c -o execinfo.So
30 + $(CC) -shared -Wl,-soname,libexecinfo.so.1 -o libexecinfo.so.1 stacktraverse.So execinfo.So
32 -NOPROFILE= yes
34 -DPADD= ${LIBM}
35 -LDADD= -lm
37 -#WARNS?= 4
39 -#stacktraverse.c: gen.py
40 -# ./gen.py > stacktraverse.c
42 -.include <bsd.lib.mk>
43 +clean:
44 + rm -rf *.o *.So *.a *.so