#
# 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 = -fPIC
CXXFLAGS   =  -Os

LID_PLUGIN_DIR=opal-3.4.2/lid
prefix=/home/robertj/opal
exec_prefix=${prefix}
libdir=${exec_prefix}/lib


CC=gcc
CXX=g++
LDSO=-shared -Wl,-soname,$(SONAME)

ifndef PREFIX
PREFIX=/usr/local
endif

SONAME	= ixj

OBJDIR	= ./obj

SRCS	+= ixj_unix.cxx

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

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

PLUGIN	= ./ixj_lid_pwplugin.so

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

$(PLUGIN): $(OBJECTS)
	$(CC) $(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)

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