#define DoProfileLib ProfileLibDps
#define DoDebugLib DebugLibDps
#define DoSharedLib SharedLibDps
#ifdef NormalLibDps
#define DoNormalLib NormalLibDps
#else
#define DoNormalLib YES
#endif
#include "Library.tmpl"

  DPS_INCLUDES = ../../include
EXTRA_INCLUDES = -I${DPS_INCLUDES}
        PSWRAP = ../../clients/pswrap/pswrap

#if HasMotif
MOTIFSRCS = FSBwraps.psw FontSample.c FontSB.c FontCreato.c \
	CSBwraps.psw ColorSB.c DSWwraps.psw DPSScrollW.c
MOTIFOBJS = FSBwraps.o FontSample.o FontSB.o FontCreato.o \
	CSBwraps.o ColorSB.o DSWwraps.o DPSScrollW.o
#endif

#ifndef DefaultResourcePath
#define DefaultResourcePath NULL
#endif
RESPATH = DefaultResourcePath

#if NoStrstr
 EXTRA_DEFINES = -DNO_STRSTR_AVAILABLE -DDEFAULT_RESOURCE_PATH=\"${RESPATH}\"
#else
 EXTRA_DEFINES = -DDEFAULT_RESOURCE_PATH=\"${RESPATH}\"
#endif


DERIVED_FILES = FSBwraps.c FSBwraps.h XDPSpwraps.c XDPSpwraps.h \
	XDPSswraps.c XDPSswraps.h CSBwraps.c CSBwraps.h \
	DSWwraps.c DSWwraps.h

SRCS =  XDPSpwraps.psw XDPSswraps.psw XDPSshare.c XDPSpreview.c \
	XDPSuserpath.c

OBJS = 	XDPSpwraps.o XDPSswraps.o XDPSshare.o XDPSpreview.o \
	XDPSuserpath.o

.SUFFIXES: .psw

.psw.o :
	$(PSWRAP) -o $*.c -h $*.h $<
	_DebuggedObjCompile($(_NOOP_))
	_ProfiledObjCompile($(_NOOP_))
	_SharedObjCompile($(_NOOP_))
	_NormalObjCompile($(_NOOP_))
	$(RM) $*.c

LibraryObjectRule()

#if DoSharedLib
        SODPSREV = SharedDpsRev
#if DoNormalLib
SharedLibraryTarget(dpstk,$(SODPSREV),$(OBJS),shared,..)
#else
SharedLibraryTarget(dpstk,$(SODPSREV),$(OBJS),.,.)
#endif
InstallSharedLibrary(dpstk,$(SODPSREV),$(USRLIBDIR))
#endif
#if DoNormalLib
NormalLibraryTarget(dpstk,$(OBJS))
InstallLibrary(dpstk,$(USRLIBDIR))
#endif
#if DebugLibDps
DebuggedLibraryTarget(dpstk,$(OBJS))
InstallLibrary(dpstk_d,$(USRLIBDIR))
#endif
#if ProfileLibDps
ProfiledLibraryTarget(dpstk,$(OBJS))
InstallDpsProfiledLibrary(dpstk_p,$(USRLIBDIR))
#endif

#if HasMotif

#if DoSharedLib
#if DoNormalLib
SharedLibraryTarget(dpstkXm,$(SODPSREV),$(MOTIFOBJS),shared,..)
#else
SharedLibraryTarget(dpstkXm,$(SODPSREV),$(MOTIFOBJS),.,.)
#endif
InstallSharedLibrary(dpstkXm,$(SODPSREV),$(USRLIBDIR))
#endif
#if DoNormalLib
NormalLibraryTarget(dpstkXm,$(MOTIFOBJS))
InstallLibrary(dpstkXm,$(USRLIBDIR))
#endif
#if DebugLibDps
DebuggedLibraryTarget(dpstkXm,$(MOTIFOBJS))
InstallLibrary(dpstkXm_d,$(USRLIBDIR))
#endif
#if ProfileLibDps
ProfiledLibraryTarget(dpstkXm,$(MOTIFOBJS))
InstallDpsProfiledLibrary(dpstkXm_p,$(USRLIBDIR))
#endif

InstallAppDefaults(FontSelect)
InstallAppDefaults(ColorSelect)
#endif

clean ::
	${RM} $(DERIVED_FILES) $(MOTIFOBJS)
