# makefile.query_string    Sep 04   WJS

#  BINDIR is where executables should end up
#  MASTERINCDIR is where "system" .h files live
#  LIBDIR is where the library containing query_string_routines.c lives
#  SRCDIR is where main programs' .c & .o files live

BINDIR = ../../bin
MASTERINCDIR = ../include
LIBDIR = ../lib
SRCDIR = .
LIBNAME = jgofs.a

DOPTIONS_FILE = ${MASTERINCDIR}/default.h

CFLAGS = -g
LIB = ${LIBDIR}/${LIBNAME}

include ${MASTERINCDIR}/h_file_dependency_macros.include
INCLUDED_FILES = ${MASTERINCDIR}/query_string_routines.h

I_LIST = -I ${MASTERINCDIR}
LIB_LIST = ${LIB}
SWITCHES = -DOPTIONS='"${DOPTIONS_FILE}"'

all: ${BINDIR}/parse_query_string

${BINDIR}/parse_query_string: ${SRCDIR}/parse_query_string.o \
			      ${LIB_LIST} \
			      ${CONFIG_FILE}
	@- test -d ${BINDIR} || mkdir ${BINDIR}
	$(CC) ${CFLAGS} \
		${SRCDIR}/parse_query_string.o \
		${LIB_LIST} \
		-o $@

${SRCDIR}/parse_query_string.o: ${SRCDIR}/parse_query_string.c \
			     ${INCLUDED_FILES} \
			     ${CORE_H_DEPENDS} \
			     ${CONFIG_FILE}
	$(CC) ${CFLAGS} \
		${I_LIST} \
		${SWITCHES} \
		-c ${SRCDIR}/parse_query_string.c \
		-o $@
