## 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 22:35:00 keith Exp $
##
##  $Log: Makefile,v $
##  Revision 1.3  2009/11/01 22:35:00  keith
##  Added GPL to source code.
##
##  Revision 1.2  2009/03/18 00:52:32  keith
##  Added checks for NDEBUG macro.
##
##  Revision 1.1  2009/02/15 09:18:42  keith
##  Initial revision
##
##

INCDIR=../include

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

VPATH=RCS

OBJ=_sexpr_global.o _sexpr_parse_pair.o _sexpr_create_string_value.o \
	_sexpr_find_end_of_string.o sexpr_parse.o sexpr_format.o \
	_sexpr_format_list.o _sexpr_format_string.o sexpr_load.o sexpr_error.o \
	_sexpr_assign_car.o


TARGET=libsexpr.a

$(TARGET): $(TARGET)(_sexpr_global.o) $(TARGET)(_sexpr_parse_pair.o) \
	$(TARGET)(_sexpr_create_string_value.o) \
	$(TARGET)(_sexpr_find_end_of_string.o) \
	$(TARGET)(sexpr_parse.o) $(TARGET)(_sexpr_assign_car.o) \
	$(TARGET)(sexpr_format.o) $(TARGET)(_sexpr_format_list.o) \
	$(TARGET)(_sexpr_format_string.o) $(TARGET)(sexpr_load.o) \
	$(TARGET)(sexpr_error.o)
	$(AR) $(ARFLAGS) $(TARGET) $(OBJ)

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

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

$(TARGET)(_sexpr_global).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(_sexpr_parse_pair).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(_sexpr_create_string_value).o: $(INCDIR)/sexpr.h

$(TARGET)(_sexpr_find_end_of_string).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(sexpr_parse).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(_sexpr_assign_car).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(sexpr_format).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(_sexpr_format_list).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(_sexpr_format_string).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(sexpr_load).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h

$(TARGET)(sexpr_error).o: $(INCDIR)/tbox.h $(INCDIR)/sexpr.h
