#
# makefile for jgofs.a library
# modified for additional dependencies, jdb v1.0b September 10, 1999 clh
# updated for v1.5 JGOFS software clh, November 3, 1998
#
INCDIR = ../include/
SRCDIR = ./
LIBDIR = ./

all: ${LIBDIR}jgofs.a
############################# jgofs.a  ###########################
DATA_SYS_OBJS   = $(DATA_SYS_C_SRC:.c=.o) ${SRCDIR}jdb.o ${SRCDIR}dct.o

DATA_SYS_C_SRC  = ${SRCDIR}HTParse.c \
                  ${SRCDIR}HTString.c \
                  ${SRCDIR}HTTCP.c    \
		  ${SRCDIR}path_info_routines.c \
		  ${SRCDIR}outer_utils.c

${SRCDIR}jdb.o:${SRCDIR}jdb.c ${INCDIR}default.h ${INCDIR}inner.h
	$(CC) ${CFLAGS} -c -DOBJECT_ROOT='"${JGOFSDIR}/objects"' \
	 -DMETHOD_ROOT='"${JGOFSDIR}/methods/"' \
	 -DOPTIONS='"${INCDIR}default.h"' \
	 -DINNEROPTIONS='"${INCDIR}inner.h"' ${SRCDIR}jdb.c

${SRCDIR}dct.o:${SRCDIR}dct.c
	$(CC) ${CFLAGS} -c -DOBJECT_ROOT='"${JGOFSDIR}/objects"' \
	 -DMETHOD_ROOT='"${JGOFSDIR}/methods/"' ${SRCDIR}dct.c

${LIBDIR}jgofs.a: $(DATA_SYS_OBJS)
	$(AR) $@ $?
	$(RANLIB) $@
	@echo "Finished building $@"

clean:
	-rm ${SRCDIR}HTParse.o ${SRCDIR}HTString.o ${SRCDIR}HTTCP.o \
            ${SRCDIR}path_info_routines.o \
	    ${SRCDIR}outer_utils.o \
	    ${SRCDIR}jdb.o ${SRCDIR}dct.o ${LIBDIR}jgofs.a
