1# 2# Makefile for SBC Codec Plugin 3# 4# Copyright (C) 2008 Christian Hoene, All Rights Reserved 5# 6# The contents of this file are subject to the Mozilla Public License 7# Version 1.0 (the "License"); you may not use this file except in 8# compliance with the License. You may obtain a copy of the License at 9# http://www.mozilla.org/MPL/ 10# 11# Software distributed under the License is distributed on an "AS IS" 12# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 13# the License for the specific language governing rights and limitations 14# under the License. 15# 16# The Original Code is Open H323 library. 17# 18# The Initial Developer of the Original Code is Christian Hoene 19# 20# Contributor(s): ______________________________________. 21# 22# $Log$ 23# 24 25AC_PLUGIN_DIR=@AC_PLUGIN_DIR@ 26prefix=@prefix@ 27exec_prefix=@exec_prefix@ 28libdir=@libdir@ 29 30SRCDIR = . 31PLUGINDIR=../.. 32SONAME = sbccodec 33SAMPLERATE_LIB = -lsamplerate 34 35CC =@CC@ 36CFLAGS =@CFLAGS@ 37CXXFLAGS =@CXXFLAGS@ 38CXX =@CXX@ 39LDSO =@LDSO@ 40PLUGINEXT =@PLUGINEXT@ 41STDCCFLAGS =@STDCCFLAGS@ -DSBC_DISABLE_PTLIB=1 -DOPAL_G711PLC=1 42LDFLAGS =@LDFLAGS@ 43 44SBC_CFLAGS =@SBC_CFLAGS@ 45SBC_LIBS =@SBC_LIBS@ 46 47SBC_SYSTEM= @SBC_SYSTEM@ 48 49SRCS = $(SRCDIR)/sbccodec.cxx \ 50 $(SRCDIR)/sbc.c \ 51 $(SRCDIR)/g711a1_plc.cxx 52 53EXTRACCFLAGS = -I$(PLUGINDIR) 54EXTRALIBS = $(SAMPLERATE_LIB) 55 56OBJDIR = ./obj 57 58vpath %.o $(OBJDIR) 59vpath %.c $(SRCDIR) 60vpath %.cxx $(SRCDIR) 61 62ifeq ($(VERBOSE),) 63Q_CC = @echo [CC] `echo $< | sed s^@OPALDIR@/^^` ; 64Q_LD = @echo [LD] `echo $(PLUGIN) | sed s^@OPALDIR@/^^` ; 65endif 66 67 68$(OBJDIR)/%.o : %.c 69 @mkdir -p $(OBJDIR) >/dev/null 2>&1 70 $(Q_CC)$(CC) -c $(STDCCFLAGS) $(EXTRACCFLAGS) $(CFLAGS) -o $@ $< 71 72$(OBJDIR)/%.o : %.cxx 73 @mkdir -p $(OBJDIR) >/dev/null 2>&1 74 $(Q_CC)$(CXX) -c -I../../../include $(STDCCFLAGS) $(CXXFLAGS) $(EXTRACCFLAGS) -o $@ $< 75 76PLUGIN = ./sbc_audio_ptplugin.$(PLUGINEXT) 77 78OBJECTS = $(addprefix $(OBJDIR)/,$(patsubst %.cxx,%.o,$(patsubst %.c,%.o,$(notdir $(SRCS))))) 79 80$(PLUGIN): $(OBJECTS) 81 $(Q_LD)$(CXX) $(LDSO) -o $@ $^ $(EXTRALIBS) 82 83$(SRCDIR)/g711a1_plc.cxx: ../../../src/codec/g711a1_plc.cxx 84 @ln -s ../../../src/codec/g711a1_plc.cxx $(SRCDIR)/g711a1_plc.cxx 85 86install: 87 mkdir -p $(DESTDIR)$(libdir)/$(AC_PLUGIN_DIR) 88 install $(PLUGIN) $(DESTDIR)$(libdir)/$(AC_PLUGIN_DIR) 89 90uninstall: 91 rm -f $(DESTDIR)$(libdir)/$(AC_PLUGIN_DIR)/$(PLUGIN) 92 93clean: 94 rm -f $(OBJECTS) $(PLUGIN) 95 96distclean: clean 97 rm -f Makefile g711a1_plc.cxx 98 99########################################### 100