
/* to build the Motif library, set this to YES, else NO */
#define UseMotif YES

/* add any extra load flags such as -static or -g */
LOCAL_LDFLAGS = -g

/* Include files for tcl, Motif and the Send package.
   Change the first two as needed (SEND is included in this package)
 */
MOTIF_INCLUDE = /usr/local/include
TCL_INCLUDE = /usr/local/include
SEND_INCLUDE  = ../send

/* The corresponding libraries.
   Change the first two as needed by setting the -L option 
   (use an absolute pathname)
 */
MOTIF_LIB = -lXm -lXt -lX11
TCL_LIB = -ltcl -lm
SEND_LIB  = -Lsend -L../send -ltclXtSend

#if UseMotif
DEFINES = -g -DMOTIF
INCLUDES = -I$(MOTIF_INCLUDE) -I$(SEND_INCLUDE) -I$(TCL_INCLUDE)
LOCAL_LIBRARIES = -L. -L.. -lReplayXm $(SEND_LIB) $(TCL_LIB) $(MOTIF_LIB)
#else
INCLUDES =  -I$(SEND_INCLUDE) -I$(TCL_INCLUDE)
LOCAL_LIBRARIES = -L. -L.. -lReplayXt $(SEND_LIB) $(TCL_LIB)
#endif

#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'INCLUDES=$(INCLUDES)' 'LOCAL_LIBRARIES=$(LOCAL_LIBRARIES)'

#if UseMotif
SUBDIRS = send xmeditor
#else
SUBDIRS = send xcalc
#endif

#define IHaveSubdirs

OBJS1 = RXtPlayer.o RXtConverters.o RXtResources.o RXtRecorder.o

OBJS = button.o
/*
OBJS = button.o $(OBJS1)
*/

SRCS =	buttons.c

#if UseMotif
NormalLibraryTarget(ReplayXm,$(OBJS1))
InstallLibrary(ReplayXm,$(USRLIBDIR))
#else
NormalLibraryTarget(ReplayXt,$(OBJS1))
InstallLibrary(ReplayXt,$(USRLIBDIR))
#endif

MakeSubdirs($(SUBDIRS))

#if UseMotif
AllTarget(button)
NormalProgramTarget(button,$(OBJS),,$(LOCAL_LIBRARIES),$(LDLIBS))
#endif

MANDIR = $(LIBMANDIR)
MANSUFFIX = $(LIBMANSUFFIX)

InstallManPage(ReplayXt,$(MANDIR))

InstallNonExec(ReplayXt.h,$(INCDIR))
