#
# This Makefile is for compiling the Sx library on UNIX systems.  If
# running on HP-UX, change some of the definitions to the alternate
# forms commented out below.  To make "sxDemo", you may have to change
# the LIBS definition to refer to your own local X library.
#

OBJS = sxButton.o sxDispatch.o sxEntry.o sxMenu.o sxNotify.o sxPack.o \
	sxScrollbar.o sxSelect.o sxTitle.o sxUtils.o List_Init.o \
	List_Insert.o List_Move.o List_Remove.o panic.o \
	tkAtom.o tkError.o tkSelect.o \
	Hash_CreateEntry.o Hash_FindEntry.o Hash_InitTable.o Hash.o \
	HashChainSearch.o

LIBS=
LDLIBS = -lX11
# for HP-UX, use this: LDLIBS = -lX11 -lPW -lBSD

CFLAGS = -g -I. -I../tcl
# for HP-UX, use this: CFLAGS = -y -I.

sx.a:	${OBJS}
	rm -f sx.a
	ar cr sx.a ${OBJS}
	ranlib sx.a

sxDemo:	sx.a sxDemo.o ${LIBS}
	${CC} ${CFLAGS} sxDemo.o sx.a ${LIBS} ${LDLIBS} -o sxDemo

clean:
	rm -f ${OBJS} sxDemo.o sxDemo sx.a
