# 
#  Copyright 1990, 1991 by the Massachusetts Institute of Technology and
#  UniSoft Group Limited.
#  
#  Permission to use, copy, modify, distribute, and sell this software and
#  its documentation for any purpose is hereby granted without fee,
#  provided that the above copyright notice appear in all copies and that
#  both that copyright notice and this permission notice appear in
#  supporting documentation, and that the names of MIT and UniSoft not be
#  used in advertising or publicity pertaining to distribution of the
#  software without specific, written prior permission.  MIT and UniSoft
#  make no representations about the suitability of this software for any
#  purpose.  It is provided "as is" without express or implied warranty.
# 
#  $XConsortium: lstprprts.m,v 1.4 92/06/11 17:54:08 rws Exp $
#  
#
# Makefile for ListProperties
#

SOURCES=lstprprts.m 
CFILES=Test.c 
OFILES=Test.o 
LOFILES=link.o 
LINKOBJ=lstprprts.o
LINKEXEC=lstprprts


# $XConsortium: mmxpinit.mc,v 1.2 92/06/29 19:42:27 rws Exp $
#
# X Protocol tests.
#

# CFLAGS - Compilation flags specific to the X Protocol tests.
#
CFLAGS=$(XP_CFLAGS)
SYSLIBS=$(XP_SYSLIBS)
LIBS=$(XP_LIBS)

# LINTFLAGS - Flags for lint specific to the X Protocol tests.
#
LINTFLAGS=$(XP_LINTFLAGS)
LINTLIBS=$(XP_LINTLIBS)

# $XConsortium: mmsa.mc,v 1.2 92/06/29 19:42:24 rws Exp $
#
# Build a standalone version of the test case.
#
Test: $(OFILES) $(LIBS) $(TCM) $(AUXFILES)
	$(CC) $(LDFLAGS) -o $@ $(OFILES) $(TCM) $(LIBLOCAL) $(LIBS) $(SYSLIBS)

Test.c: $(SOURCES)
	$(CODEMAKER) -o Test.c $(SOURCES)

# $XConsortium: mmlink.mc,v 1.2 92/06/29 19:42:10 rws Exp $
#
# A version of the test that can be combined together with
# all the other tests to make one executable.  This will save a
# fair amount of disk space especially if the system does not
# have shared libraries.  Different names are used so that
# there is no possibility of confusion.
#
link.c: $(SOURCES)
	$(CODEMAKER) -l -o link.c $(SOURCES)

# Link the objects into one large object.
#
$(LINKOBJ): $(LOFILES)
	$(LD) $(LINKOBJOPTS) $(LOFILES) -o $(LINKOBJ)

# Link the object file into the parent directory.
#
../$(LINKOBJ): $(LINKOBJ)
	$(RM) ../$(LINKOBJ)
	$(LN) $(LINKOBJ) ..

# Make a link to the combined executable.
#
$(LINKEXEC): ../Tests
	$(RM) $(LINKEXEC)
	$(LN) ../Tests $(LINKEXEC)

../Tests: ../$(LINKOBJ)

linkexec:: $(LINKEXEC) $(AUXFILES) ;

# $XConsortium: mmxplib.mc,v 1.2 92/06/29 19:42:29 rws Exp $
# 
# This part of the makefile checks for the existance of the libraries
# and creates them if necessary.
#

# The xtestlib is made if it doesn't exist
#
$(XTESTLIB):
	cd $(XTESTROOT)/src/lib; $(TET_BUILD_TOOL) install

# The fontlib is made if it doesn't exist
#
$(XTESTFONTLIB):
	cd $(XTESTROOT)/fonts; $(TET_BUILD_TOOL) install

# The X Protocol test library is made if it doesn't exist
#
$(XSTLIB):
	cd $(XTESTROOT)/src/libproto; $(TET_BUILD_TOOL) install

# $XConsortium: mmmisc.mc,v 1.3 92/06/29 19:42:14 rws Exp $
#
# Miscellaneous housekeeping functions.
#

# clean up and remove remakable sources, objects and junk files.
#
clean:
	$(RM) Test $(OFILES) $(LOFILES) $(LINKOBJ) $(LINKEXEC) core\
		MTest m$(LINKEXEC) $(MOFILES) CONFIG Makefile.bak $(AUXCLEAN)\
		MTest.c Test.c mlink.c link.c Makefile *.err

# clobber - aka clean.
#
clobber:	clean

# Lint makerules
#
lint: $(CFILES)
	$(LINT) $(LINTFLAGS) $(CFILES) $(LINTTCM) $(LINTLIBS)

LINT:lint

