## 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.3 2009/11/01 20:38:53 keith Exp $
##
##  $Log: Makefile,v $
##  Revision 1.3  2009/11/01 20:38:53  keith
##  Added GPL to source code.
##
##  Revision 1.2  2009/03/18 00:32:22  keith
##  Added checks for NDEBUG macro.
##
##  Revision 1.1  2009/03/02 05:29:28  keith
##  Initial revision
##
##

##
##
## DNDEBUG turns off assert() calls.
##
INC=../include
CFLAGS=-Wall -O -I$(INC) $(MT_CC)
VPATH=SRC
OBJ = alloc_func.o bind_func.o copy_bind.o get_args.o main.o \
	open_dfile.o output_record.o parse_field_list.o process_agfunc.o \
	process_file.o parse_avg_sum_field_list.o compile_filters.o \
	eval_agfunc.o

TARGET = dfile_agfunc

$(TARGET): $(OBJ)
	$(CC) -O -o $(TARGET) $(OBJ) -L../lib \
		-lwhere -lsexpr -ldfile_dynamic -ldfile -ltbox -lz -lpthread

main.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

get_args.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

alloc_func.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

bind_func.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

copy_bind.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

compare_bind.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

free_record.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

open_dfile.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

output_record.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

parse_field_list.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

process_agfunc.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

process_file.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

parse_avg_sum_field_list.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

compile_filters.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

eval_agfunc.o: $(INC)/tbox.h $(INC)/dfile.h dfile_agfunc.h

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