## Copyright (C) 2009, 2010, 2011, 2012 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/>.
## 


##
## DNDEBUG turns off assert() calls.
##
INC=../include
CFLAGS=-Wall -O -I$(INC) $(MT_CC)
VPATH=SRC
OBJ = main.o get_args.o open_input_dfile.o open_output_dfile.o \
	prepare_input_dfile.o diff_records.o copy_input_to_output.o \
	assign_non_key_bind.o open_change_data_dfile.o compare_non_key_data.o

TARGET = dfile_diff

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

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

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

open_input_dfile.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

open_output_dfile.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

prepare_input_dfile.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

diff_records.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

copy_input_to_output.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

assign_non_key_bind.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

open_change_data_dfile.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

compare_non_key_data.o: $(INC)/tbox.h $(INC)/dfile.h dfile_diff.h

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