#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
#if NoStrstr
 EXTRA_DEFINES = -DNO_STRSTR_AVAILABLE
#else
 EXTRA_DEFINES =
#endif
#else
RESPATH = DefaultResourcePath
#if NoStrstr
 EXTRA_DEFINES = -DNO_STRSTR_AVAILABLE -DDEFAULT_RESOURCE_PATH=\"${RESPATH}\"
#else
 EXTRA_DEFINES = -DDEFAULT_RESOURCE_PATH=\"${RESPATH}\"
#endif
#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_))
	_NormalObjCompile($(_NOOP_))
	_SharedObjCompile($(_NOOP_))
	$(RM) $*.c

LibraryObjectRule()

#if DoSharedLib
        SODPSREV = SharedDpsRev
SharedLibraryTarget(dpstk,$(SODPSREV),$(OBJS),.,.)
InstallSharedLibrary(dpstk,$(SODPSREV),$(USRLIBDIR))
#endif
#if DoNormalLib
#if DoSharedLib
UnsharedLibraryTarget(dpstk,$(OBJS),unshared,..)
#else
NormalLibraryTarget(dpstk,$(OBJS))
#endif
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
SharedLibraryTarget(dpstkXm,$(SODPSREV),$(MOTIFOBJS),.,.)
InstallSharedLibrary(dpstkXm,$(SODPSREV),$(USRLIBDIR))
#endif
#if DoNormalLib
#if DoSharedLib
UnsharedLibraryTarget(dpstkXm,$(MOTIFOBJS),unshared,..)
#else
NormalLibrayTarget(dpstkXm,$(MOTIFOBJS))
#endif
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)
