## Copyright (C) 2009, 2010, 2011 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=-g -Wall -D_REENTRANT -I $(INC) -D_LARGE_FILES $(MT_CC)

VPATH=SRC

OBJ = main.o get_args.o open_input.o assign_output_tags.o \
	load_range_partition_file.o find_partition.o divvy_cmp.o map_bind.o

TARGET = dfile_partition

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

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

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

open_input.o: $(INC)/tbox.h $(INC)/dfile.h dfile_partition.h

find_partition.o: $(INC)/tbox.h $(INC)/dfile.h dfile_partition.h

divvy_cmp.o: $(INC)/tbox.h $(INC)/dfile.h dfile_partition.h

assign_output_tags.o: $(INC)/tbox.h $(INC)/dfile.h dfile_partition.h

load_range_partition_file.o: $(INC)/tbox.h $(INC)/dfile.h dfile_partition.h

map_bind.o: $(INC)/tbox.h $(INC)/dfile.h dfile_partition.h

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