# ***************************************************************
#  source build-env before make-ing this file
#  Note: build routine does this for you
# ***************************************************************
#
# 20 May 09.  WJS
#	Add iovaldouble_stub per libupd 1.3
#   5 Dec 06.  WJS
#	Change location of outer.h
#	Note that this make file should be changed to use an lm-specific
#     copy of outer, the way other methods do.  However, since lm is the only
#     method left in contrib that does NOT do this, it is the only method using
#     outer.o, and the problems that led to per-method outer sources should
#     not apply
#   1 Sep 04.  WJS
#	Some mods for new library organization, etc.  Note mods
#     for "new way to do outer" have NOT been made - see make
#     files for other methods if interested

METHBINDIR  = ../../methods/
OUTERSRCDIR = ../methods/
INCDIR = ../include/
OUTERINCDIR=${OUTERSRCDIR}
LIBDIR = ../lib/
SRCDIR = ./

DEPEND_INC =	${OUTERINCDIR}outer.h \
		${INCDIR}default.h \
 		${INCDIR}inner.h

DEPEND_CC =	${OUTERSRCDIR}outer.c \
		${LIBDIR}err_stub_methods.o \
		${LIBDIR}iovaldouble_stub.o \
		${LIBDIR}jgofs.a

SWITCHES =      -DMYADDR='"${MYADDR}"' \
                -DOPTIONSERVER='"${OPTIONSERVER}"' \
                -DINFOSERVER='"${INFOSERVER}"' \
                -DDIRSERVER='"${DIRSERVER}"' \
                -DBUTTONIMAGESDIR='"${BUTTONIMAGESDIR}"' \
		-DOPTIONS='"${INCDIR}default.h"' \
		-DINNEROPTIONS='"${INCDIR}inner.h"' \
		-I${OUTERINCDIR} -I${INCDIR}

ALL =	${METHBINDIR}lm

all: ${ALL}

${METHBINDIR}lm:${SRCDIR}lm.c \
		${DEPEND_CC} \
		${DEPEND_INC}
	@-test -d ${METHBINDIR} || mkdir ${METHBINDIR}
	$(CC) ${CFLAGS} \
	${SWITCHES} \
	lm.c ${DEPEND_CC} -o $@

clean:
	-rm ${SRCDIR}lm.o \
        ${SRCDIR}outer.o  \
	${METHBINDIR}lm
