#
# Project      : CERFS Database Access Library
#
# Url          : <A HREF="http://"> Location </A>
#
# File         : %M% 
#
# Owner        : Graeme Burnett 
#
# Type         : %Y%
#
# Modification History 
#--------------------
#
# Dated              Version         Who             Description
# ----------------------------------------------------------
# 
# %D% %T%            %W%             
#
# 1998/11/17 08:19   1.1             burnetgr        Original version of the
#                                                    makefile 
#

#
# Name          : makefile - for the libdb.a archive 
#
# Synopsis      : make 
#
# Arguments     : none
#
# Description   : Builds the library for the database abstraction layer of the
# 		  cerfs project (which is ficticious)
#
# See Also      : 
#

ESQL=esql
ESQLCFLAGS=-g -I$(INCLUDE) -local
CFLAGS=-g -I$(INCLUDE)
CC=cc_r
GET=iget

.SUFFIXES       : .ec .ec~

.ec.o:
        @rm -f $*.o $*.c $(ESQL) -c $(ESQLCFLAGS) $<

.ec.a:
	@rm -f $*.o $*.c $(ESQL) -c $(ESQLCFLAGS) $<
	$(AR) $(ARFLAGS) $@ $*.o @rm -f $*.o $*.c

.ec:
	@rm -f $*.o $*.c $(ESQL)
	$(ESQLCFLAGS) $< -o $@
	@rm -f $*.o $*.c

.ec~.o: 
	$(GET) $(GFLAGS) -p $< > $*.ec
	@rm -f $*.o $*.c 
	$(ESQL) -c $(ESQLCFLAGS) $<
	@rm -f $*.o $*.c

INCLUDE=../incl

HEADERS= \
	$(INCLUDE)/c.class.h 		\
	$(INCLUDE)/c.defs.h 		\ 
	$(INCLUDE)/c.incl.h 		\
	$(INCLUDE)/c.proto.h 		\ 
	$(INCLUDE)/error.class.h	\
	$(INCLUDE)/esql.class.h 	\
	$(INCLUDE)/esql.defs.h		\
	$(INCLUDE)/esql.incl.h		\
	$(INCLUDE)/esql.proto.h		\
	$(INCLUDE)/global.h		\ 
	$(INCLUDE)/hash.h		\
	$(INCLUDE)/md5.h		\ 
	$(INCLUDE)/md5global.h 

LIBDIR=../../lib

IULIB=$(LIBDIR)/libdb.a
LOCKLIB=$(LIBDIR)/liblock.a

ESQLCFLAGS= -O -I$(INCLUDE) 
CFLAGS= -O -I.$(INCLUDE)

all:
	$(IULIB)

$(IULIB): \
	$(HEADERS)  								\
	makefile								\
	$(LIBDIR)/libdb.a(CStripComment.o) \ $(LIBDIR)/libdb.a(Error.o)		\
	$(LIBDIR)/libdb.a(IUCheck.o) \ $(LIBDIR)/libdb.a(IUCheckSQLCode.o)	\
	$(LIBDIR)/libdb.a(IUCheckDBSignature.o)


Author: Graeme Burnett    
Draft
  Last Updated :