#    Mohawk Software Framework by Mohawk Software
#    Copyright (C) 1998-2002 Mark L. Woodward
# 
#    This library is free software; you can redistribute it and/or
#    modify it under the terms of the GNU General Public
#    License as published by the Free Software Foundation; either
#    version 2 of the License, or (at your option) any later version.
# 
#    This library is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#    General Public License for more details.
# 
#    You should have received a copy of the GNU General Public
#    License along with this library; if not, write to the Free
#    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
#    MA 02111-1307, USA
# 
#    If you want support or to professionally license this library, the author
#    can be reached at info@mohawksoft.com

MOHAWK_HOME=..
include $(MOHAWK_HOME)/lib/config.mak

ifdef DEBUG
CARGS+=-DTRACE_DEBUG
endif


ALL=msessiond$(EXE) plugin.$(DLL_EXT) fnplug.$(DLL_EXT) flexplug.$(DLL_EXT) protplug.$(DLL_EXT)

ifdef PGPLUG
ALL+=pgplug.$(DLL_EXT)
endif

LIB=../$(LIBNAM).$(LIB_EXT)

all : $(ALL)

msessiond$(EXE) : msessiond.$(OBJ_EXT)

msessiond.$(OBJ_EXT) : msessiond.cpp

plugin.$(DLL_EXT) : plugin.cpp

funct.$(DLL_EXT) : funct.cpp

pgplug.$(DLL_EXT) : pgplug.cpp

clean :
	rm -f *.$(OBJ_EXT)
	rm -f $(ALL)
	rm -f core*
	rm -f test.blk
	rm -f *.so

fresh : clean $(ALL)

ifndef BINDIR
BINDIR=../bin
endif

install: $(ALL) 
	cp $(ALL) pgplug.$(DLL_EXT) $(BINDIR)

strip: $(ALL)
	strip $(ALL)
