#
# Makefile for Quicknet IxJack LID plugin
#
# Copyright (C) 2004 Post Increment, All Rights Reserved
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is Open H323 library.
#
# The Initial Developer of the Original Code is Post Increment
#
# Contributor(s): ______________________________________.
#
# $Log: Makefile.in,v $
# Revision 1.3  2007/09/05 11:52:55  csoutheren
# Fix compilation on MacOSX
#
# Revision 1.2  2006/10/03 09:42:03  rjongbloed
# Start of unix support for LID plug ins
#
# Revision 1.1  2006/10/02 13:30:52  rjongbloed
# Added LID plug ins
#
#

STDCCFLAGS =@STDCCFLAGS@
CXXFLAGS   =@CXXFLAGS@

LID_PLUGIN_DIR=@LID_PLUGIN_DIR@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@


CC=@CC@
CXX=@CXX@
LDSO=@LDSO@

ifndef PREFIX
PREFIX=/usr/local
endif

SONAME	= ixj

OBJDIR	= ./obj

SRCS	+= ixj_unix.cxx

vpath	%.o $(OBJDIR)
vpath	%.cxx $(SRCDIR)

ifeq ($(VERBOSE),)
Q_CC = @echo [CC] `echo $< | sed s^@OPALDIR@/^^` ;
Q_LD = @echo [LD] `echo $(PLUGIN) | sed s^@OPALDIR@/^^` ;
endif


$(OBJDIR)/%.o : %.cxx
	@mkdir -p $(OBJDIR) >/dev/null 2>&1
	$(Q_CC)$(CXX) -I../../../include $(STDCCFLAGS) $(OPTCCFLAGS) $(CXXFLAGS) -c $< -o $@

PLUGIN	= ./ixj_lid_pwplugin.so

OBJECTS = $(addprefix $(OBJDIR)/,$(patsubst %.cxx,%.o,$(notdir $(SRCS))))

$(PLUGIN): $(OBJECTS)
	$(Q_LD)$(CXX) $(LDSO)$(SONAME) -o $@ $^ $(EXTRALIBS)

install:
	mkdir -p $(DESTDIR)$(libdir)/$(LID_PLUGIN_DIR)
	install  $(PLUGIN) $(DESTDIR)$(libdir)/$(LID_PLUGIN_DIR)

uninstall:
	rm -f $(DESTDIR)$(libdir)/$(LID_PLUGIN_DIR)/$(PLUGIN)

clean:
	rm -f $(OBJECTS) $(PLUGIN)

###########################################
