## Copyright (C) 2009 Keith Crane
## 
## This file is part DFILE Tools.
## 
## DFILE Tools 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 3 of the License, or (at
## your option) any later version.
## 
## DFILE Tools 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 DFILE Tools; see the file COPYING.  If not, see
## <http://www.gnu.org/licenses/>.
## 

##
##  $Id: Makefile,v 1.4 2009/11/01 22:45:20 keith Exp $
##
##
##  $Log: Makefile,v $
##  Revision 1.4  2009/11/01 22:45:20  keith
##  Added GPL to source code.
##
##  Revision 1.3  2009/03/18 00:53:17  keith
##  Added checks for NDEBUG macro.
##
##  Revision 1.2  2009/03/14 21:34:58  keith
##  Change _where.h to be in include directory.
##
##  Revision 1.1  2009/02/18 06:41:34  keith
##  Initial revision
##
##

INCDIR=../include

##
## DNDEBUG turns off assert() calls.
##
CFLAGS=-Wall -D_REENTRANT -O -I$(INCDIR) $(MT_CC)
#CFLAGS=$(64bit) -qmaxmem=20480 -D_REENTRANT -O -DNDEBUG -I$(INCDIR)

VPATH=RCS

OBJ=_where_build_syntax_tree.o _where_condition_syntax.o where_compile_file.o \
	_where_multi_cond_syntax.o _where_compare_syntax.o \
	_where_multi_datum_syntax.o _where_datum_syntax.o \
	_where_multi_condition.o _where_compare_condition.o where_condition.o \
	_where_condition.o where_error.o _where_global.o _where_in_syntax.o \
	_where_in_condition.o _where_like_syntax.o _where_like_condition.o \
	where_compile_sexpr.o

TARGET=libwhere.a

$(TARGET): $(TARGET)(_where_build_syntax_tree.o) \
	$(TARGET)(_where_condition_syntax.o) \
	$(TARGET)(where_compile_file.o) \
	$(TARGET)(_where_multi_cond_syntax.o) \
	$(TARGET)(_where_compare_syntax.o) \
	$(TARGET)(_where_multi_datum_syntax.o) \
	$(TARGET)(_where_datum_syntax.o) \
	$(TARGET)(_where_multi_condition.o) \
	$(TARGET)(_where_compare_condition.o) \
	$(TARGET)(where_condition.o) \
	$(TARGET)(_where_condition.o) \
	$(TARGET)(where_error.o) \
	$(TARGET)(_where_global.o) \
	$(TARGET)(_where_in_syntax.o) \
	$(TARGET)(_where_in_condition.o) \
	$(TARGET)(_where_like_syntax.o) \
	$(TARGET)(_where_like_condition.o) \
	$(TARGET)(where_compile_sexpr.o)
	$(AR) $(ARFLAGS) $(TARGET) $(OBJ)

64bit:
	$(MAKE) '64bit=-q64' 'ARFLAGS=-rv -X64'

clean:
	rm -f $(TARGET) $(OBJ)

$(TARGET)(_where_build_syntax_tree).o: $(INCDIR)/tbox.h $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_condition_syntax).o: $(INCDIR)/tbox.h $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(where_compile_file).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_multi_cond_syntax).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_compare_syntax).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_multi_datum_syntax).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_datum_syntax).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_multi_condition).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_compare_condition).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(where_condition).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_condition).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(where_error).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_global).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_in_syntax).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_like_condition).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(_where_like_syntax).o: $(INCDIR)/where.h $(INCDIR)/_where.h

$(TARGET)(where_compile_sexpr).o: $(INCDIR)/where.h $(INCDIR)/_where.h
