makefile.patch 979 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --- Makefile.orig
  2. +++ Makefile
  3. @@ -23,24 +23,25 @@
  4. # SUCH DAMAGE.
  5. #
  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
  9. -LIB= execinfo
  10. +CC=cc
  11. +AR=ar
  12. +EXECINFO_CFLAGS=$(CFLAGS) -std=gnu99 -c
  13. +EXECINFO_LDFLAGS=$(LDFLAGS)
  14. -SRCS= stacktraverse.c stacktraverse.h execinfo.c execinfo.h
  15. +all: static dynamic
  16. -INCS= execinfo.h
  17. +static:
  18. + $(CC) $(EXECINFO_CFLAGS) stacktraverse.c
  19. + $(CC) $(EXECINFO_CFLAGS) execinfo.c
  20. + $(AR) rcs libexecinfo.a stacktraverse.o execinfo.o
  21. -SHLIB_MAJOR= 1
  22. -SHLIB_MINOR= 0
  23. +dynamic:
  24. + $(CC) $(EXECINFO_CFLAGS) stacktraverse.c -o stacktraverse.So
  25. + $(CC) $(EXECINFO_CFLAGS) execinfo.c -o execinfo.So
  26. + $(CC) -shared -Wl,-soname,libexecinfo.so.1 -o libexecinfo.so.1 stacktraverse.So execinfo.So
  27. -NOPROFILE= yes
  28. -
  29. -DPADD= ${LIBM}
  30. -LDADD= -lm
  31. -
  32. -#WARNS?= 4
  33. -
  34. -#stacktraverse.c: gen.py
  35. -# ./gen.py > stacktraverse.c
  36. -
  37. -.include <bsd.lib.mk>
  38. +clean:
  39. + rm -rf *.o *.So *.a *.so