#
SHELL=/bin/sh

@SET_MAKE@

top_srcdir=@top_srcdir@
srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
lib_dir=@exec_prefix@/lib
x_includes=@x_includes@
x_libraries=@x_libraries@
fvwm_icons=@fvwm_icons@
fvwm_rc=@fvwm_rc@
fvwm_name=@fvwm_name@

EXTRA_DEFINES=-DXPM -DSHAPE
CC=@CC@
INCLUDES=-I${top_srcdir}/include ${x_includes}
CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES}
MAKEDEPEND=@MAKEDEPEND@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
RM=@RM@
AR=@AR@
RANLIB=@RANLIB@

STATIC_LIB=lib${fvwm_name}.a

SRCS=GetFdWidth.c \
       GetFont.c \
       GetLine.c \
       Picture.c \
       ReadPacket.c \
       SendInfo.c \
       SendText.c \
       SetMask.c \
       envvar.c \
       findIconFile.c \
       hostname.c \
       mygetostype.c \
       safemalloc.c \
       sleep.c \
       strutils.c \
       wild.c

OBJS=GetFdWidth.o \
       GetFont.o \
       GetLine.o \
       Picture.o \
       ReadPacket.o \
       SendInfo.o \
       SendText.o \
       SetMask.o \
       envvar.o \
       findIconFile.o \
       hostname.o \
       mygetostype.o \
       safemalloc.o \
       sleep.o \
       strutils.o \
       wild.o


all: ${STATIC_LIB}

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

install: all
	mkdir -p ${lib_dir}
	${INSTALL_DATA} ${STATIC_LIB} ${lib_dir}

uninstall:
	rm -f ${lib_dir}/${STATIC_LIB}

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

distclean: clean

${STATIC_LIB}: ${OBJS}
	${AR} ${STATIC_LIB} ${OBJS}
	${RANLIB} ${STATIC_LIB}

#
