#
# $Header: /cvsroot/lesstif/lesstif/clients/Motif-1.2/mwm/Makefile.am,v 1.40 2005/03/26 06:52:24 dannybackx Exp $
#

#
# 2.1 and 2.0 have precendence
#
if ! Version_2_1
if ! Version_2_0
if Version_1_2
bin_PROGRAMS= mwm
endif
endif
endif

MAINTAINERCLEANFILES=Makefile.in mwmlex.c mwmparse.c mwmparse.h

mwm_SOURCES=	colormaps.c cursors.c decorate.c defaults.c desktop.c \
		events.c functions.c icons.c menus.c misc.c move.c \
		mwm.c mwm.h mwmparse.y mwmlex.l mwmstrings.h \
		pager.c pan.c props.c resize.c resources.c screens.c \
		windows.c gethostname.c

#BUILT_SOURCES = mwmlex.c mwmparse.c mwmparse.h

# we don't use it currently: mwmerr.c

AM_CPPFLAGS=	-I$(top_srcdir)/include/Motif-1.2 \
		-I../../../include/Motif-1.2 \
		${X_CFLAGS} \
		-DMWM_DDIR=\"$(mwmddir)\" \
		-DXINCL_PATH=\"@x_includes@\"

LDADD=		../../../lib/Xm/libXm.la \
		$(X_LIBS) -lXt $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS)

appdir=		$(libdir)/X11/app-defaults

mwmddir=	$(libdir)/X11/mwm
mwmd_DATA=	system.mwmrc alt.map README

EXTRA_DIST=	Mwm.ad system.mwmrc alt.map README COPYING


# Special dependencies
#mwmparse.h: mwmparse.c
#mwmlex.o: mwmparse.h

AM_YFLAGS=		-d

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(appdir)
	$(INSTALL_DATA) $(srcdir)/Mwm.ad $(DESTDIR)$(appdir)/Mwm
