#
SHELL=/bin/sh

@SET_MAKE@

top_srcdir=@top_srcdir@
srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
bin_dir=@exec_prefix@/bin
x_includes=@x_includes@
x_libraries=@x_libraries@

man_dir=@prefix@/man/man1

XPM_LIBRARY=-lXpm
X_LIBRARY=-lX11 @LIBS@

LIBS=${x_libraries} ${XPM_LIBRARY} ${X_LIBRARY}

CC=@CC@
INCLUDES=-I${top_srcdir}/include ${x_includes}
CFLAGS=${INCLUDES} @CFLAGS@ ${PATH_DEFINES} 
MAKEDEPEND=@MAKEDEPEND@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
RM=@RM@

PROG=xpmroot

SRCS = xpmroot.c
OBJS = xpmroot.o

all: ${PROG}

depend:
	${MAKEDEPEND} ${CFLAGS} ${SRCS}

install: all
	${INSTALL_PROGRAM} ${PROG} ${bin_dir}
	${INSTALL_DATA} ${PROG}.man ${man_dir}/${PROG}.1 

uninstall:
	${RM} ${bin_dir}/${PROG}
	${RM} ${man_dir}/${PROG}.1

clean:
	${RM} ${PROG} ${OBJS} *~ core *.bak

distclean: clean

${PROG}: ${OBJS}
	${CC} -o ${PROG} ${OBJS} ${LIBS}
