patch-Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- libpri-1.4.10.2.orig/Makefile 2008-08-06 20:20:51.000000000 +0200
  2. +++ libpri-1.4.10.2/Makefile 2011-04-01 14:39:42.851818751 +0200
  3. @@ -31,8 +31,8 @@ CC=gcc
  4. GREP=grep
  5. AWK=awk
  6. -OSARCH=$(shell uname -s)
  7. -PROC?=$(shell uname -m)
  8. +OSARCH=Linux
  9. +PROC?=$(ARCH)
  10. # SONAME version; should be changed on every ABI change
  11. # please don't change it needlessly; it's perfectly fine to have a SONAME
  12. @@ -43,7 +43,8 @@ STATIC_LIBRARY=libpri.a
  13. DYNAMIC_LIBRARY:=libpri.so.$(SONAME)
  14. STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o version.o
  15. DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo version.lo
  16. -CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS)
  17. +CFLAGS?=
  18. +CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC $(ALERTING) $(LIBPRI_COUNTERS)
  19. INSTALL_PREFIX=$(DESTDIR)
  20. INSTALL_BASE=/usr
  21. libdir?=$(INSTALL_BASE)/lib
  22. @@ -135,7 +136,7 @@ pridump: pridump.o
  23. MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$@).d -MP
  24. %.o: %.c
  25. - $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
  26. + $(CC) $(CPPFLAGS) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
  27. %.lo: %.c
  28. $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
  29. @@ -145,8 +146,7 @@ $(STATIC_LIBRARY): $(STATIC_OBJS)
  30. ranlib $(STATIC_LIBRARY)
  31. $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
  32. - $(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
  33. - $(LDCONFIG) $(LDCONFIG_FLAGS) .
  34. + $(CC) -shared $(SOFLAGS) $(LDFLAGS) -o $@ $(DYNAMIC_OBJS)
  35. ln -sf libpri.so.$(SONAME) libpri.so
  36. version.c: FORCE