Blob Blame History Raw
XCOMM $TOG: Imakefile /main/16 1998/03/11 20:19:03 mgreess $
XCOMM 
XCOMM Motif
XCOMM
XCOMM Copyright (c) 1987-2012, The Open Group. All rights reserved.
XCOMM
XCOMM These libraries and programs are free software; you can
XCOMM redistribute them and/or modify them under the terms of the GNU
XCOMM Lesser General Public License as published by the Free Software
XCOMM Foundation; either version 2 of the License, or (at your option)
XCOMM any later version.
XCOMM
XCOMM These libraries and programs are distributed in the hope that
XCOMM they will be useful, but WITHOUT ANY WARRANTY; without even the
XCOMM implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
XCOMM PURPOSE. See the GNU Lesser General Public License for more
XCOMM details.
XCOMM
XCOMM You should have received a copy of the GNU Lesser General Public
XCOMM License along with these librararies and programs; if not, write
XCOMM to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
XCOMM Floor, Boston, MA 02110-1301 USA

INCLUDES = -I. -I$(INCLUDESRC) -I$(MINCLUDESRC) -I$(MLIBSRC) -I$(MTOP)/include
DEPLIBS = XmClientDepLibs
LOCAL_LIBRARIES = XmClientLibs

 
SRCS1 =	wml.c		wmlouth.c	wmloutmm.c \
	wmloutp1.c	wmlresolve.c	wmlsynbld.c	wmlutils.c \
	wmldbcreate.c
 
OBJS1 =	wml.o		wmloutkey.o	wmlouth.o	wmloutmm.o \
	wmloutp1.o	wmlresolve.o	wmlsynbld.o	wmlutils.o
 
SRCS2 = wmluiltok.l
 
OBJS2 = wmlparse.o
 
SRCS = $(SRCS1) $(SRCS2)
 
YACCTARGETS = UilLexPars.c	UilLexPars.h

WMLTARGETS = UilConst.h	UilKeyTab.h	 \
	UilSymArTa.h	UilSymArTy.h	UilSymCSet.h	UilSymCtl.h \
	UilSymEnum.h	UilSymGen.h	UilSymNam.h	UilSymRArg.h \
	UilSymReas.h	UilTokName.h	UilUrmClas.h	UilSymChCl.h \
	UilSymChTa.h

TARGETS = $(YACCTARGETS) $(WMLTARGETS)
 
TABLE = motif.wml
WMDTABLE = motif.wmd
WMLTOOLS = wml wmluiltok
REPORT = wml.report

NormalLibraryObjectRule()
 
all::	DONE

DONE:	$(WMDTABLE) $(TARGETS)
	(cd $(UILSRC); $(RM) $(TARGETS) UilDBDef.h)
	cp $(TARGETS) UilDBDef.h $(UILSRC)
	touch DONE

NormalLibraryTarget(wml,$(OBJS2) $(OBJS1))

install:: all
 
wml::	libwml.a
	$(CC) $(CFLAGS) libwml.a -o wml

NormalProgramTarget(wmldbcreate,wmldbcreate.o,$(DEPLIBS),$(LOCAL_LIBRARIES),$(SYSLIBS))

wmlparse.c:	wmlparse.y wmllex.l
	$(LEX) wmllex.l
	$(MV) lex.yy.c wmllex.c
	$(YACC) -d $(YACCFLAGS) wmlparse.y
	$(RM) wmlparse.c wmlparse.h
	$(MV) y.tab.c wmlparse.c
	$(MV) y.tab.h wmlparse.h
 
wmlparse.h::	wmlparse.y wmllex.l
	$(LEX) wmllex.l
	$(MV) lex.yy.c wmllex.c
	$(YACC) -d $(YACCFLAGS) wmlparse.y
	$(MV) y.tab.c wmlparse.c
	$(MV) y.tab.h wmlparse.h
 
wmluiltok::	wmluiltok.l
	$(LEX) wmluiltok.l
	$(CC) $(CFLAGS) lex.yy.c $(LEXLIB) -o wmluiltok

$(TARGETS):	$(WMLTOOLS) $(TABLE)
	$(RM) $(TARGETS) $(REPORT) wml-uil.mm
	$(YACC) -d $(YACCFLAGS) Uil.y
	$(MV) y.tab.c UilLexPars.c
	$(MV) y.tab.h UilLexPars.h
	./wmluiltok < Uil.y > tokens.dat
	$(RM) wml-uil.mm
	./wml $(TABLE)
	$(RM) tokens.dat

$(WMDTABLE):	wmldbcreate
	$(CLIENTENVSETUP) ./wmldbcreate -o $@

clean::
	$(RM) $(TARGETS) $(WMDTABLE) $(REPORT) lex.yy.c libwml.a wml \
	*.mm *.sdml *.txt wmlparse.c wmlparse.h wmluiltok wmllex.c \
	tokens.dat DONE
 
depend:: wmlparse.h 

DependTarget()

includes::	$(TARGETS)
	(cd $(UILSRC); $(RM) $(TARGETS) UilDBDef.h)
	cp $(TARGETS) UilDBDef.h $(UILSRC)