#ifndef WcTopDir
#define WcTopDir ..
#endif

#include "../Wc.tmpl"

XCOMM #########################################################################
XCOMM # SCCS_data: %Z% %M% %I% %E% %U%
XCOMM #
XCOMM # Motif Resource Interpreter - Mri/Imakefile
XCOMM #
#if !HasSharedLibraries
          DEPLIBS = $(WCTOPDIR)/Wc/libWc.a $(WCTOPDIR)/Xmp/libXmp.a
#endif

   CLIENT_LDFLAGS = $(XMPLDFLAG)
      CLIENT_LIBS = $(XMPLIB) $(XMLIB)
DEBUG_CLIENT_LIBS = $(DEBUGXMPLIB) $(DEBUGXMLIB)
      CLIENT_INCS = XmpLibraryOptions

           CLIENT = Mri
            CLASS = MRi
             SRCS = Mri.c
             OBJS = Mri.o

/* Installed in .../app-defaults/CLIENT
*/
         APPDEFS = Demo \
		   Hello Goodbye Periodic \
		   PerTem PT_ColumnLabel PT_DisplayBox \
		   Template RcResFile TEM_OptMenu \
		   Menubar Popup OptMenu \
		   Dialogs TableDialog AppShells TopLevels Shells \
		   Traversal ListRC ListTable Form 

#include "../WcClient.tmpl"

/* Make the test program which is not installed
*/
all:: Test

SpecialObjectRule(Test.o,Test.c,$(DEBUG_CLIENT_OPTIONS))

#ifdef NullParameter
NormalProgramTarget(Test,Test.o,$(DEPLIBS),$(DEBUG_LIBRARIES),NullParameter)
#else
NormalProgramTarget(Test,Test.o,$(DEPLIBS),$(DEBUG_LIBRARIES),)
#endif

clean::
	rm -f Test.o

#if MakeProfileLibs
/* Make profiled client to use profiled libraries
*/
all:: Profiled

Profiled.c: Test.c
	rm -f Profiled.c ; ln Test.c Profiled.c

SpecialObjectRule(Profiled.o,Profiled.c,-pg -DPROFILE $(LDOPTIONS))

#ifdef NullParameter
NormalProgramTarget(Profiled,Profiled.o,$(DEPLIBS),-pg -Bstatic $(LOCAL_LIBRARIES),NullParameter)
#else
NormalProgramTarget(Profiled,Profiled.o,$(DEPLIBS),-pg -Bstatic $(LOCAL_LIBRARIES),)
#endif

clean::
	rm -f Profiled.o Profiled.c

#endif /*MakeProfileLibs*/

XCOMM #########################################################################
XCOMM # Targets which make it easier to use SaberC
XCOMM #

 WCSRC= ../Wc/MapAg.c		../Wc/WcActCB.c		../Wc/WcConvert.c \
	../Wc/WcCreate.c	../Wc/WcInvoke.c	../Wc/WcLateBind.c \
	../Wc/WcLoadRes.c	../Wc/WcName.c		../Wc/WcReg.c \
	../Wc/WcRegXt.c		../Wc/WcSetValue.c	../Wc/WcTemplate.c \
	../Wc/WcWarn.c
 XPSRC= ../Xmp/Table.c		../Xmp/TableLoc.c	../Xmp/TableVec.c \
	../Xmp/Xmp.c

/* Saber needs Sun, so... */
 DYN_LINK_FLAGS = -DWC_HAS_dlopen_AND_dlsym

Saber:
	#load -C $(CFLAGS) $(DEBUG_CLIENT_OPTIONS) $(SRCS) $(LDOPTIONS) $(DEBUG_LIBRARIES) -ldl

SaberAll:
	#load -C $(DYN_LINK_FLAGS) $(CFLAGS) $(DEBUG_CLIENT_OPTIONS) $(SRCS) $(XPSRC) $(WCSRC) $(LDOPTIONS) $(DEBUG_LIBRARIES) -ldl

SaberTest:
	#load -C $(DYN_LINK_FLAGS) $(CFLAGS) $(DEBUG_CLIENT_OPTIONS) Test.c $(XPSRC) $(WCSRC) $(LDOPTIONS) $(DEBUG_LIBRARIES) -ldl
