## 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/>.
## 

INCDIR=../include

##
## DNDEBUG turns off assert() calls.
##
CFLAGS=-O -Wall -I$(INCDIR) $(MT_CC)

VPATH=RCS

OBJ=alloc_record.o free_record.o append_tag.o sum_field_length.o \
	alloc_record_key.o format_hash_values.o

TARGET=libdfile_utility.a

$(TARGET): $(TARGET)(alloc_record.o) \
	$(TARGET)(free_record.o) \
	$(TARGET)(append_tag.o) \
	$(TARGET)(sum_field_length.o) \
	$(TARGET)(alloc_record_key.o) \
	$(TARGET)(format_hash_values.o)
	$(AR) $(ARFLAGS) $(TARGET) $(OBJ)

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

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

$(TARGET)(alloc_record).o: $(INCDIR)/dfile.h $(INCDIR)/tbox.h \
	$(INCDIR)/dfile_utility.h

$(TARGET)(free_record).o: $(INCDIR)/dfile.h $(INCDIR)/tbox.h \
	$(INCDIR)/dfile_utility.h

$(TARGET)(append_tag).o: $(INCDIR)/dfile.h $(INCDIR)/tbox.h \
	$(INCDIR)/dfile_utility.h

$(TARGET)(sum_field_length).o: $(INCDIR)/dfile.h $(INCDIR)/tbox.h \
	$(INCDIR)/dfile_utility.h

$(TARGET)(alloc_record_key).o: $(INCDIR)/dfile.h $(INCDIR)/tbox.h \
	$(INCDIR)/dfile_utility.h

$(TARGET)(format_hash_values).o: $(INCDIR)/dfile.h $(INCDIR)/tbox.h \
	$(INCDIR)/dfile_utility.h
