[Asterisk-cvs] libpri Makefile,1.18,1.19
kpfleming
kpfleming
Mon Aug 29 15:11:11 CDT 2005
Update of /usr/cvsroot/libpri
In directory mongoose.digium.com:/tmp/cvs-serv12978
Modified Files:
Makefile
Log Message:
cleanups and fixes for Solaris (issue #4999)
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/libpri/Makefile,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- Makefile 27 Jul 2005 13:14:05 -0000 1.18
+++ Makefile 29 Aug 2005 19:12:31 -0000 1.19
@@ -41,6 +41,8 @@
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
INSTALL_PREFIX=
INSTALL_BASE=/usr
+SOFLAGS = -Wl,-hlibpri.so.1
+LDCONFIG = /sbin/ldconfig
ifeq (${OSARCH},Linux)
LDCONFIG_FLAGS=-n
else
@@ -50,13 +52,11 @@
endif
endif
ifeq (${OSARCH},SunOS)
-CFLAGS += -DSOLARIS -I../zaptel-solaris -lsocket -lnsl
-SOFLAGS =
-LDCONFIG = echo
-INSTALL_BASE = /usr/local
-else
-SOFLAGS = -Wl,-soname,libpri.so.1
-LDCONFIG = /sbin/ldconfig
+CFLAGS += -DSOLARIS -I../zaptel-solaris
+LDCONFIG =
+LDCONFIG_FLAGS = \# # Trick to comment out the period in the command below
+SOSLINK = ln -sf libpri.so.1.0 libpri.so.1
+#INSTALL_PREFIX = /opt/asterisk # Uncomment out to install in standard Solaris location for 3rd party code
endif
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
@@ -78,21 +78,29 @@
fi
install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
- mkdir -p $(INSTALL_PREFIX)/$(INSTALL_BASE)/lib
- mkdir -p $(INSTALL_PREFIX)/$(INSTALL_BASE)/include
- 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 libpri.so )
- install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)/$(INSTALL_BASE)/lib
+ 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 libpri.so )
+ install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
$(LDCONFIG)
+else
+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY)
+ ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1 libpri.so ; $(SOSLINK) )
+ install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 644 $(STATIC_LIBRARY)
+endif
uninstall:
@echo "Removing Libpri"
- rm -f $(INSTALL_PREFIX)/$(INSTALL_BASE)/lib/libpri.so.1.0
- rm -f $(INSTALL_PREFIX)/$(INSTALL_BASE)/lib/libpri.so
- rm -f $(INSTALL_PREFIX)/$(INSTALL_BASE)/lib/libpri.a
- rm -f $(INSTALL_PREFIX)/$(INSTALL_BASE)/include/libpri.h
+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1.0
+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1
+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so
+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.a
+ rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libpri.h
pritest: pritest.o
$(CC) -o pritest pritest.o -L. -lpri -lzap $(CFLAGS)
@@ -121,6 +129,7 @@
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
$(LDCONFIG) $(LDCONFIG_FLAGS) .
ln -sf libpri.so.1 libpri.so
+ $(SOSLINK)
clean:
rm -f *.o *.so *.lo *.so.1 *.so.1.0
@@ -131,4 +140,4 @@
depend: .depend
.depend:
- ./mkdep ${CFLAGS} `ls *.c`
+ CC=$(CC) ./mkdep ${CFLAGS} `ls *.c`
More information about the svn-commits
mailing list