#
# Makefile for moog version 0.0
#

OBJS = cso.o help.o misc.o panel.o util.o error.o index.o net.o save.o \
       xgopher.o gui.o list.o options.o text.o

HDRS = conf.h gopher.h list.h options.h xglobals.h cso.h gui.h listP.h \
       prefixP.h error.h help.h misc.h resources.h cursor.h

DELIVERABLES = moog Moog.ad moog.help moog.man

#
# Installation directories - these will probably need changing!
#
BINDIR = /usr/local/bin
LIBDIR = /usr/lib/X11
MANDIR = /usr/local/man/manl

#
# This seems to work on SunOS 4.1.x, with IXI Motif and X11R5/X11R4...
#
CFLAGS = -D_NO_PROTO -DXGOPHER_X11R4 -g 
LIBS = -lXm -lXt -lX11

# 
# This seems to work on HP-UX 8, with HP's X11R4/Motif1.1 release...
#
# CFLAGS = -I/usr/include/X11R4 -I/usr/include/Motif1.1 -DXGOPHER_X11R4 -g
# LIBS = -L/usr/lib/Motif1.1 -L/usr/lib/X11R4 -lXm -lXt -lX11

moog: 	$(OBJS) $(HDRS)
	$(CC) $(OBJS) -g $(CFLAGS) $(LIBS) -o $@

install:	$(DELIVERABLES)
	cp moog $(BINDIR)
	chmod 0755 $(BINDIR)/moog

	cp Moog.ad $(LIBDIR)/app-defaults/Moog
	chmod 0444 $(LIBDIR)/app-defaults/Moog

	cp moog.help $(LIBDIR)
	chmod 0444 $(LIBDIR)/moog.help

	cp moog.man $(MANDIR)/moog.l
	chmod 0444 $(MANDIR)/moog.l

clean:
	rm -f $(OBJS) moog

