1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
--- Makefile.orig 2010-02-11 23:35:49.000000000 +0600
+++ Makefile 2010-10-10 12:40:22.000000000 +0700
@@ -27,7 +27,7 @@
# Uncomment if you want libpri to count number of Q921/Q931 sent/received
#LIBPRI_COUNTERS=-DLIBPRI_COUNTERS
-CC=gcc
+CC?=gcc
GREP=grep
AWK=awk
@@ -37,7 +37,7 @@
# SONAME version; should be changed on every ABI change
# please don't change it needlessly; it's perfectly fine to have a SONAME
# of 1.2 and a version of 1.4.x
-SONAME:=1.4
+SONAME:=1
STATIC_LIBRARY=libpri.a
DYNAMIC_LIBRARY:=libpri.so.$(SONAME)
@@ -83,9 +83,9 @@
rose_qsig_mwi.lo \
rose_qsig_name.lo \
version.lo
-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS) $(LIBPRI_OPT)
-INSTALL_PREFIX=$(DESTDIR)
-INSTALL_BASE=/usr
+CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS) $(LIBPRI_OPT)
+INSTALL_PREFIX=$(PREFIX)
+INSTALL_BASE=
libdir?=$(INSTALL_BASE)/lib
SOFLAGS:=-Wl,-h$(DYNAMIC_LIBRARY)
LDCONFIG = /sbin/ldconfig
@@ -95,7 +95,7 @@
ifeq (${OSARCH},FreeBSD)
LDCONFIG_FLAGS=-m
CFLAGS += -I../zaptel -I../zapata
-INSTALL_BASE=/usr/local
+INSTALL_BASE=
endif
endif
ifeq (${OSARCH},SunOS)
@@ -147,12 +147,12 @@
mkdir -p $(INSTALL_PREFIX)$(libdir)
mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include
ifneq (${OSARCH},SunOS)
- install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
- install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
+ $(BSD_INSTALL_DATA) libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
+ $(BSD_INSTALL_PROGRAM) $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
#if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then /sbin/restorecon -v $(INSTALL_PREFIX)$(libdir)/$(DYNAMIC_LIBRARY); fi
( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libpri.so.$(SONAME) libpri.so)
- install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
- if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(libdir); fi
+ $(BSD_INSTALL_DATA) $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
+ #if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(libdir); fi
else
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
install -f $(INSTALL_PREFIX)$(libdir) -m 755 $(DYNAMIC_LIBRARY)
@@ -188,7 +188,7 @@
$(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
%.lo: %.c
- $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
+ $(CC) $(CFLAGS) $(MAKE_DEPS) -fPIC -c -o $@ $<
$(STATIC_LIBRARY): $(STATIC_OBJS)
ar rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
@@ -196,7 +196,7 @@
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
- $(LDCONFIG) $(LDCONFIG_FLAGS) .
+ #$(LDCONFIG) $(LDCONFIG_FLAGS) .
ln -sf libpri.so.$(SONAME) libpri.so
version.c: FORCE
|