#
# Makefile for xcalc 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 -DSYSV
OBJS =		xcalc.o actions.o math.o

all:		prog install
prog:		xcalc xcalc.1x

# --- Clean up

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

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

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

# --- Build xcalc

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

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

# --- Build the manual

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

