#
# $Header: /cvsroot/lesstif/lesstif/clients/Motif-2.0/uil/Makefile.am,v 1.13 2005/03/26 06:52:24 dannybackx Exp $
#

#
# 2.1 has precendence
#
if ! Version_2_1
if Version_2_0
bin_PROGRAMS=	uil
noinst_PROGRAMS   = newuil
endif
endif

MAINTAINERCLEANFILES=Makefile.in lex.c yacc.c yacc.h

noinst_HEADERS = yacc.h

SRCS_1_2 = \
		Attribute.c Callback.c Expression.c ExpressionList.c \
		FakeWidget.c Include.c MrmTypes.c glue.c yacc.y lex.l \
		main.c \
		Attribute.h Callback.h Expression.h ExpressionList.h \
		FakeWidget.h Include.h MrmTypes.h glue.h main.h
SRCS_2_0 = 

# non-local stuff
#BUILT_SOURCES =	lex.c yacc.c yacc.h

uil_SOURCES =  ${SRCS_1_2:%=../../Motif-1.2/uil/%} \
               $(SRCS_2_0)

$(SRCS_1_2) newuil.c:
	rm -f $@
	$(LN_S) $(srcdir)/../../Motif-1.2/uil/$@ $@


# Ensure that the non-local headers are linked
$(uil_OBJECTS): $(HDRS_1_2)

# Special dependencies
#yacc.h: yacc.c
#lex.o: yacc.h

AM_CPPFLAGS=	-I$(top_srcdir)/clients/Motif-1.2/uil \
                -I$(top_srcdir)/include/Motif-2.0 \
		-I../../../include/Motif-2.0 \
                -I$(top_srcdir)/include/Motif-1.2 \
		-I../../../include/Motif-1.2 \
		-I$(top_srcdir)/lib/Mrm \
		-I../../../lib/Mrm \
		$(X_CFLAGS)

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

newuil_LDADD = ../../../lib/Uil-2.0/libUil.la $(LDADD)

AM_YFLAGS=		-d

clean-local:
	@for i in $(SRCS_1_2) ; do \
	   if test -r $$i; then \
	      rm $$i; \
	   fi ; \
	   done
