1# 2# Makefile for G.722 codec plugin 3# 4# Copyright (C) 2008 Vox Lucida Pty. Ltd., 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 Phone Abstraction Library. 17# 18# The Initial Developer of the Original Code is Robert Jongbloed 19# 20# Contributor(s): ______________________________________. 21# 22# $Revision$ 23# $Author$ 24# $Date$ 25# 26 27AC_PLUGIN_DIR=@AC_PLUGIN_DIR@ 28prefix=@prefix@ 29exec_prefix=@exec_prefix@ 30libdir=@libdir@ 31target_os=@target_os@ 32 33SONAME = g722 34STDCCFLAGS += @STDCCFLAGS@ -fPIC 35 36SRCDIR = ./VoIPCodecs 37OBJDIR = ./obj 38PLUGINDIR=../.. 39 40CC =@CC@ 41CXX =@CXX@ 42LDSO =@LDSO@ 43PLUGINEXT =@PLUGINEXT@ 44STDCCFLAGS =@STDCCFLAGS@ 45LDFLAGS =@LDFLAGS@ 46EXTRACFLAGS =-I$(PLUGINDIR) 47 48SRCS += g722codec.c \ 49 $(SRCDIR)/g722_encode.c \ 50 $(SRCDIR)/g722_decode.c \ 51 $(SRCDIR)/bitstream.c 52 53vpath %.o $(OBJDIR) 54vpath %.c $(SRCDIR) 55 56ifeq ($(VERBOSE),) 57Q_CC = @echo [CC] `echo $< | sed s^@OPALDIR@/^^` ; 58Q_LD = @echo [LD] `echo $(PLUGIN) | sed s^@OPALDIR@/^^` ; 59endif 60 61 62$(OBJDIR)/%.o : %.c 63 @mkdir -p $(OBJDIR) >/dev/null 2>&1 64 $(Q_CC)$(CC) -I../../../include $(STDCCFLAGS) $(OPTCCFLAGS) $(EXTRACFLAGS) $(CFLAGS) -c $< -o $@ 65 66PLUGIN = ./g722_audio_pwplugin.$(PLUGINEXT) 67 68OBJECTS = $(addprefix $(OBJDIR)/,$(patsubst %.c,%.o,$(notdir $(SRCS)))) 69 70all: $(PLUGIN) 71 72$(PLUGIN): $(OBJECTS) 73ifeq (solaris,$(findstring solaris,$(target_os))) 74 75 $(Q_LD)$(CC) $(LDSO) $@ -o $@ $^ $(EXTRALIBS) 76else 77 $(Q_LD)$(CC) $(LDSO) -o $@ $^ $(EXTRALIBS) 78 79endif 80 81install: 82 mkdir -p $(DESTDIR)$(libdir)/$(AC_PLUGIN_DIR) 83 install $(PLUGIN) $(DESTDIR)$(libdir)/$(AC_PLUGIN_DIR) 84 85uninstall: 86 rm -f $(DESTDIR)$(libdir)/$(AC_PLUGIN_DIR)/$(PLUGIN) 87 88clean: 89 rm -f $(OBJECTS) $(PLUGIN) 90 91########################################### 92