#
# Copyright (c) 1992 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# Make Definitions file for the Internet Rover Problem Display Programs
#
#	Bill - once XmStrings problem gets address, remove comments in xmap@wbn
HDRS=	xmap.h motif.h
SRCS=	MapConfig.c color.c linkwidth.c menus.c playback.c scan.c main.c \
	xmapdialogs.c res.c version.c getline.c
OBJS=	MapConfig.o color.o linkwidth.o menus.o playback.o scan.o main.o \
	xmapdialogs.o res.o version.o getline.o
#
LIBS=	-lm ${BSDLIB}
MYLIBS=	-lctools -lProblemManager -lStatusFileManager -lLinkfileio \
	-lLinkWidthfileio
XLIBS=	-lXm -lXt -lXext -lX11
POLLER=	../Pollers/ProcessNeighborTable.o
#
DEFINES=-D_BSD -D_NO_PROTO -DMANYEXPOSE
INCLUDES=-I. -I../../../include
CFLAGS=	 ${INCLUDES} ${DEFINES} ${ACFLAGS}
LDFLAGS= -L/usr/local/lib -L${LIBDIR} ${MYLIBS} ${XLIBS} ${LIBS} ${ALDFLAGS}

default :
	( cd ../../.. ; make xmap )

all: xmap

install: 
	rm -f ${BINDIR}/xmap
#@wbn	cp xmap ${BINDIR}	

xmap:
	make clean
#@wbn	Fix the XmStrings problem....
#xmap:	${OBJS}
#@wbn	${CC} -o $@ ${OBJS} ${POLLER} ${LDFLAGS}

version.c: Version.c
	(u=$${USER-root} h=`hostname` t=`date` v=`cat ../../../VERSION`; \
	sed -e "s|%WHEN%|$${t}|" \
	    -e "s|%VERSION%|$${v}|" \
	    -e "s|%WHOANDWHERE%|$${u}@$${h}|" \
	    < Version.c > version.c)

clean:
	rm -f *.o core xmap version.c

depend: ${SRCS}
	mkdep ${CFLAGS} ${SRCS}

lint: ${SRCS}
	lint -Dlint ${DEFINES} ${INCLUDES} ${SRCS} | grep -v "/usr/include/Xm"

tags:
	ctags -t ${SRCS} ${HDRS}

# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

MapConfig.c:
color.c:
linkwidth.c:
menus.c:
playback.c:
scan.c:
main.c:
xmapdialogs.c:
res.c:
version.c:

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
