#
# Makefile for xfd using XawPlus
# Version for S.u.S.E. Linux 4.4.1 (XFree 3.2A)
# 
# Roland Krause 1997
#
LIB_PATH =	-L../../XawPlus -L/usr/X11/lib		# Libraries for X windows
INC_PATH =	-I../../XawPlus -I/usr/X11/include	# Header for X windows
LIBRARIES =	-lXawPlus -lXmu -lXext -lXt -lXpm -lX11 -lm

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

all:		prog install
prog:		xfd xfd.1x

# --- 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.1x /usr/man/man1
		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

