#    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)/src/config.mak

EXTRA_LIB=../msessionapi.o

EXTRA_INC=-I..

ifdef DEBUG
CARGS+=-DTRACE_DEBUG
endif

ALL=loadtest$(EXE) uniqtest$(EXE) newsess$(EXE) dropsess$(EXE) lock$(EXE) list$(EXE) \
	listvar$(EXE) setval$(EXE) timeout$(EXE) getval$(EXE) getall$(EXE) uniq$(EXE) \
	randstr$(EXE) loaddll$(EXE) listall$(EXE) madmin$(EXE) mping$(EXE) mexec$(EXE) \
	getsessval$(EXE) setsessval$(EXE)

all : $(ALL)

test$(EXE) : test.cpp  

getall$(EXE) : getall.cpp 

list$(EXE) : list.cpp 

listvar$(EXE) : listvar.cpp 

listall$(EXE) : listall.cpp 

newsess$(EXE) : newsess.cpp 

dropsess$(EXE) : dropsess.cpp 

lock$(EXE) : lock.cpp 

timeout$(EXE) : timeout.cpp 

setval$(EXE) : setval.cpp 

getval$(EXE) : getval.cpp 

flush$(EXE) : flush.cpp 

getvalest$(EXE) : getvalest.cpp 

loadtest$(EXE) : loadtest.cpp 

uniqtest$(EXE) : uniqtest.cpp 

uniq$(EXE) : uniq.cpp 

randstr$(EXE) : randstr.cpp 

loaddll$(EXE) : loaddll.cpp 

mping$(EXE) : mping.cpp 

clean :
	rm -f *.$(OBJ_EXT)
	rm -f $(ALL)
	rm -f *core
	rm -f test.blk
ifdef WIN32
	rm -f *.dll
	rm -f *.ilk
	rm -f *.pdb
	rm -f *.exp
endif

fresh : clean $(ALL)

doclist :
	rm -f index.*
	find $(MOHAWK_HOME)/docs -name "*.htm*" > index.docs

ifndef BINDIR
BINDIR=../../bin
endif
install: $(ALL)
	cp  $(ALL) $(BINDIR)

strip: $(ALL)
	strip $(ALL)
