#
# Makefile for xfd 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 -lm

CC =		gcc 
DEFS =		-O2 -m486
OBJS =		xfd.o grid.o

all:		prog install
prog:		xfd

# --- Clean up

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

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

install:
		cp xfd /usr/X11/bin
		cp Xfd /usr/X11/lib/X11/app-defaults
		cp xfd.man /usr/man/man1/xfd.1x
		gzip /usr/man/man1/xfd.1x

# --- Build xfd

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

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

# --- Build the manual

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

