## everything is in /usr/include or /usr/lib
#XINCLUDES=
#XLIBS=
#LDLIBS=
#CCC=CC
###

## sg irix
#XINCLUDES=-I/usr/include/X11
#XLIBS=
#LDLIBS=
#CCC=CC
###

## ibm aix
#XINCLUDES=
#XLIBS=
#LDLIBS=
#CCC=xlC -+
###

## dec osf1
#XINCLUDES=
#XLIBS=-L/usr/shlib
#LDLIBS=
###

## ncr sysv4
#XINCLUDES=
#XLIBS=
#LDLIBS=-lnsl -lsocket -lgen -lresolv
###

## nec sysv4
#XINCLUDES=
#XLIBS=
#LDLIBS=-lnsl -lsocket -lgen -lresolv
###

## novell sysv4
#XINCLUDES=-I/usr/X/include -I/usr/X/include/X11
#XLIBS=-L/usr/X/lib -L/usr/ccs/lib
#LDLIBS=-lXimp -lnsl -lsocket -lgen -lresolv
###

# solaris 2.x
XINCLUDES=-I/usr/dt/include -I/usr/openwin/include -I/usr/openwin/include/X11
XLIBS=-L/usr/dt/lib -L/usr/openwin/lib -R/usr/dt/lib -R/usr/openwin/lib
LDLIBS=-lgen
CCC=CC
VISUROOT:sh= visuroot
##

## sco sysv3.4
## -lmalloc may also be required on LDLIBS line
#XINCLUDES=
#XLIBS=
#LDLIBS=-lXext -lXmu -lrpc -lsocket -lintl
###

## hp-ux 9.x
## -Wp,-H900000 recommended if too many cpp defines.
#XINCLUDES=-I/usr/include/X11R5 -I/usr/include/Motif1.2
#XLIBS=-L/usr/lib/X11R5 -L/usr/lib/Motif1.2
#LDLIBS=
###

XPMDIR = ${VISUROOT}/contrib/xpm/lib
XPMLIB = ${VISUROOT}/user_widgets/obj
LDFLAGS = ${XLIBS} -L${XPMLIB}
MOTIFLIBS = -lXpm -lXm -lXt -lX11

XDCLASS = $(VISUROOT)/src/xdclass
XDCLASSLIBS = $(XDCLASS)/lib/libxdclass.a

CFLAGS=-I. -I../libgen -I../client ${XINCLUDES} -I${XDCLASS}/h -I${XPMDIR}
CCFLAGS=${CFLAGS} -I${XDCLASS}/h

SOURCES=\
	help.cxx\
	CGuru.cxx\
	CTopic.cxx\
	CHistList.cxx\
	CHTMLParser.cxx\
	GuruStubs.cxx

OBJECTS=\
	help.o\
	CGuru.o\
	CTopic.o\
	CHistList.o\
	CHTMLParser.o\
	GuruStubs.o

LIBS=\
	../libgen/lib.a ../client/lib.a

all: CHECKENV visu_help

visu_help: $(OBJECTS) $(LIBS)
	$(CCC) $(LDFLAGS) $(OBJECTS) $(LIBS) $(XDCLASSLIBS) $(MOTIFLIBS) -o $@

depend:
	makedepend -- $(CFLAGS) $(CPPFLAGS) -- $(SOURCES)
	makedepend -a -- $(CCFLAGS) $(CPPFLAGS) -- $(SOURCES)

clean:
	rm -f $(OBJECTS) visu_help

CHECKENV:
	@test -n "$(VISUROOT)" || (echo You must set \$$VISUROOT in the makefile or in your shell environment; exit 1)

help.o: help.cxx
	$(CCC) $(CCFLAGS) $(CPPFLAGS) -c help.cxx

CGuru.o: CGuru.cxx
	$(CCC) $(CCFLAGS) $(CPPFLAGS) -c CGuru.cxx

GuruStubs.o: GuruStubs.cxx
	$(CCC) $(CCFLAGS) $(CPPFLAGS) -c GuruStubs.cxx

CTopic.o: CTopic.cxx
	$(CCC) $(CCFLAGS) $(CPPFLAGS) -c CTopic.cxx

CHistList.o: CHistList.cxx
	$(CCC) $(CCFLAGS) $(CPPFLAGS) -c CHistList.cxx

CHTMLParser.o: CHTMLParser.cxx
	$(CCC) $(CCFLAGS) $(CPPFLAGS) -c CHTMLParser.cxx

# DO NOT DELETE THIS LINE -- make depend depends on it.
