summaryrefslogtreecommitdiff
path: root/net/asterisk-oh323/files/patch-asterisk-driver::Makefile
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2011-11-09 01:36:27 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2011-11-09 01:36:27 +0000
commit30f8bdc0a0c2588567730e6ce0d836dbf5a88e6f (patch)
treed29cc58bf292b29c2afb4636ab4cad907fb92832 /net/asterisk-oh323/files/patch-asterisk-driver::Makefile
parent- Add p5-true 0.18 (diff)
Resurrect net/asterisk-oh323.
Notes
Notes: svn path=/head/; revision=285319
Diffstat (limited to 'net/asterisk-oh323/files/patch-asterisk-driver::Makefile')
-rw-r--r--net/asterisk-oh323/files/patch-asterisk-driver::Makefile128
1 files changed, 128 insertions, 0 deletions
diff --git a/net/asterisk-oh323/files/patch-asterisk-driver::Makefile b/net/asterisk-oh323/files/patch-asterisk-driver::Makefile
new file mode 100644
index 000000000000..5e04c0e91046
--- /dev/null
+++ b/net/asterisk-oh323/files/patch-asterisk-driver::Makefile
@@ -0,0 +1,128 @@
+
+$FreeBSD$
+
+--- asterisk-driver/Makefile.orig
++++ asterisk-driver/Makefile
+@@ -34,23 +34,23 @@
+ ifndef SKIP_SUFFIX
+ ifeq ($(OH323STAT),1)
+ ifeq ($(OH323BUILDTYPE),debug) # Static, debug
+- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*_d_s.a))
++ LIBPTPATH=$(word 1,$(shell ls $(SYSLIBDIR)/libpt*_d_s.a))
+ else # Static, opt
+- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*_r_s.a))
++ LIBPTPATH=$(word 1,$(shell ls $(SYSLIBDIR)/libpt*_r_s.a))
+ endif
+ else
+ ifeq ($(OH323BUILDTYPE),debug) # Shared, debug
+- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*d.so))
++ LIBPTPATH=$(word 1,$(shell ls $(SYSLIBDIR)/libpt*d.so))
+ else # Shared, opt
+- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*r.so))
++ LIBPTPATH=$(word 1,$(shell ls $(SYSLIBDIR)/libpt*r.so))
+ endif
+ endif
+ LIBPTNAME=$(subst lib,,$(basename $(notdir $(LIBPTPATH))))
+ else
+ ifeq ($(OH323STAT),1)
+- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/$(LIBPT_BASE).a))
++ LIBPTPATH=$(word 1,$(shell ls $(SYSLIBDIR)/$(LIBPT_BASE).a))
+ else
+- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/$(LIBPT_BASE).so))
++ LIBPTPATH=$(word 1,$(shell ls $(SYSLIBDIR)/$(LIBPT_BASE).so))
+ endif
+ LIBPTNAME=$(subst lib,,$(basename $(notdir $(LIBPTPATH))))
+ endif
+@@ -59,42 +59,42 @@
+ ifndef SKIP_SUFFIX
+ ifeq ($(OH323STAT),1)
+ ifeq ($(OH323BUILDTYPE),debug) # Static, debug
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*_d_s.a))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/libh323*_d_s.a))
+ else
+ ifeq ($(OH323BUILDTYPE),opt) # Static, opt
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*_r_s.a))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/libh323*_r_s.a))
+ else # Static, opt, no trace
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*_n_s.a))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/libh323*_n_s.a))
+ endif
+ endif
+ else
+ ifeq ($(OH323BUILDTYPE),debug) # Shared, debug
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*d.so))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/libh323*d.so))
+ else
+ ifeq ($(OH323BUILDTYPE),opt) # Shared, opt
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*r.so))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/libh323*r.so))
+ else # Shared, opt, no trace
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*n.so))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/libh323*n.so))
+ endif
+ endif
+ endif
+ LIBH323NAME=$(subst lib,,$(basename $(notdir $(LIBH323PATH))))
+ else
+ ifeq ($(OH323STAT),1)
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/$(LIBH323_BASE).a))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/$(LIBH323_BASE).a))
+ else
+- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/$(LIBH323_BASE).so))
++ LIBH323PATH=$(word 1,$(shell ls $(SYSLIBDIR)/$(LIBH323_BASE).so))
+ endif
+ LIBH323NAME=$(subst lib,,$(basename $(notdir $(LIBH323PATH))))
+ endif
+ LIBH323=$(LIBH323NAME)
+
+ ifndef SKIP_EXTLIBS
+- EXTLIBS=$(shell $(PWLIBDIR)/make/ptlib-config --libs)
++ EXTLIBS=$(shell $(PWLIBDIR)/make/ptlib-config --ldflags --libs)
+ endif
+
+ CFLAGS += -pipe -Wstrict-prototypes -Wmissing-prototypes \
+- -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -fPIC -g -O6 \
++ -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -fPIC -g \
+ -fomit-frame-pointer -DAST_MODULE=\"chan_oh323.so\"
+
+ DRVDEPS=$(shell ls *.h)
+@@ -116,6 +116,7 @@
+ if [ ! -d $(DESTDIR)$(ASTERISKETCDIR) ]; then \
+ $(INSTALL) -d $(DESTDIR)$(ASTERISKETCDIR); \
+ fi
++ $(INSTALL) -m 0644 oh323.conf.sample $(DESTDIR)$(ASTERISKETCDIR)/
+ if [ ! -f $(DESTDIR)$(ASTERISKETCDIR)/oh323.conf ]; then \
+ $(INSTALL) -m 0644 oh323.conf.sample $(DESTDIR)$(ASTERISKETCDIR)/oh323.conf; \
+ fi
+@@ -151,19 +152,27 @@
+ @if [ ! -f "$(LIBH323PATH)" ]; then \
+ echo "ERROR: No OPENH323 library found!"; exit 1; \
+ fi
++ifeq ($(OH323NOWRAP),1)
++ $(CC) -shared -Xlinker -x -g -o $@ $(TARGET_OBJ) \
++ ../wrapper/*.o \
++ -L$(SYSLIBDIR) -l$(LIBH323) \
++ -L$(SYSLIBDIR) -l$(LIBPT) \
++ -lstdc++ $(EXTLIBS)
++else
+ ifeq ($(OH323STAT),1)
+ $(CC) -shared -Xlinker -x -g -o $@ $(TARGET_OBJ) \
+ -L../wrapper -loh323wrap_s \
+- -L$(OPENH323DIR)/lib -l$(LIBH323) \
+- -L$(PWLIBDIR)/lib -l$(LIBPT) \
++ -L$(SYSLIBDIR) -l$(LIBH323) \
++ -L$(SYSLIBDIR) -l$(LIBPT) \
+ -lstdc++ $(EXTLIBS)
+ else
+ $(CC) -shared -Xlinker -x -g -o $@ $(TARGET_OBJ) \
+ -L../wrapper -loh323wrap \
+- -L$(OPENH323DIR)/lib -l$(LIBH323) \
+- -L$(PWLIBDIR)/lib -l$(LIBPT) \
++ -L$(SYSLIBDIR) -l$(LIBH323) \
++ -L$(SYSLIBDIR) -l$(LIBPT) \
+ -lstdc++ $(EXTLIBS)
+ endif
++endif
+
+ %.o: %.c $(DRVDEPS)
+ $(CC) $(CFLAGS) $(ASTERISKINCLUDE) -c -o $@ $<