#
# Makefile for Xman using XawPlus 3.0
#
# Roland Krause 2000
# rokrause@aol.com
#

LIB_PATH =	-L../../XawPlus -L/usr/X11/lib
INC_PATH =	-I../../XawPlus -I/usr/X11/include
LIBRARIES =	-lXawPlus -lXmu -lXext -lXt -lXpm -lX11

CC =		gcc 
DEFS =		-DHELPFILE=\"/usr/X11/lib/X11/xman.help\" -O2 -m486
OBJS =		ScrollByL.o globals.o help.o man.o tkfuncs.o \
		buttons.o handler.o main.o misc.o search.o vendor.o

all:		prog install
prog:		xman

# --- Clean up

clean:
		rm -f *.o *.1x xman

# --- Install xman: This only works as superuser root

install:
		cp xman /usr/X11/bin
		cp Xman /usr/X11/lib/X11/app-defaults
		cp xman.help /usr/X11/lib/X11
		cp pixmaps/*.xpm /usr/X11/include/X11/pixmaps
		cp xman.man /usr/man/man1/xman.1x
		gzip /usr/man/man1/xman.1x

# --- Build xman

xman:		$(OBJS)
		$(CC) -o xman $(LIB_PATH) $(OBJS) $(LIBRARIES)
		strip xman

.c.o:
		$(CC) $(DEFS) $(INC_PATH) -c $<

# --- Build the manual

xman.1x:	xman.man
		nroff -man xman.man >xman.1x
