blob: c274238c5b4151fba4383d6b4b378b053d19a4eb (
plain) (
blame)
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
|
--- Makefile.orig Wed Jan 11 02:19:14 2006
+++ Makefile Wed Apr 26 02:47:21 2006
@@ -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
OSARCH=$(shell uname -s)
PROC?=$(shell uname -m)
@@ -35,13 +35,13 @@
TOBJS=testpri.o
T2OBJS=testprilib.o
STATIC_LIBRARY=libpri.a
-DYNAMIC_LIBRARY=libpri.so.1.0
+DYNAMIC_LIBRARY=libpri.so.1
STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
-INSTALL_PREFIX?=
-INSTALL_BASE=/usr
-SOFLAGS = -Wl,-hlibpri.so.1.0
+CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
+INSTALL_PREFIX?=$(PREFIX)
+INSTALL_BASE=
+SOFLAGS = -Wl,-hlibpri.so.1
LDCONFIG = /sbin/ldconfig
ifeq (${OSARCH},Linux)
LDCONFIG_FLAGS=-n
@@ -84,12 +84,11 @@
mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
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)$(INSTALL_BASE)/lib
- if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi
- ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 )
- install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
- if test $$(id -u) = 0; then $(LDCONFIG); fi
+ echo installing libpri.h
+ $(BSD_INSTALL_DATA) libpri.h $(INSTALL_PREFIX)/include
+ $(BSD_INSTALL_PROGRAM) $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)/lib
+ ( cd $(INSTALL_PREFIX)/lib ; ln -sf libpri.so.1 libpri.so )
+ $(BSD_INSTALL_DATA) $(STATIC_LIBRARY) $(INSTALL_PREFIX)/lib
else
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY)
@@ -130,7 +129,6 @@
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
- $(LDCONFIG) $(LDCONFIG_FLAGS) .
ln -sf libpri.so.1.0 libpri.so
ln -sf libpri.so.1.0 libpri.so.1
$(SOSLINK)
|