#
# Makefile for xmag 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 =		xmag.o CutPaste.o RootWindow.o Scale.o

all:		prog install
prog:		xmag xmag.1x

# --- Clean up

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

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

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

# --- Build xmag

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

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

# --- Build the manual

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

