#
# This is the Makefile for xminesweep 2.0 Plus.
# Note that this is a color version using XPM, which is adapted to XawPlus.
# I think it don't work on black and white terminals.
#
# 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

OBJS = 		xminesweep.o misc.o callbacks.o
SRCS = 		xminesweep.c misc.c callbacks.c
CC =		gcc
DEFS =		-O2 -m486 -DCHEAT_OK

all:		prog install
prog:		xminesweep xminesweep.1x

# --- Building xminesweep

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

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

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

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

# --- Building the manual

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

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

install:
		cp xminesweep /usr/X11/bin
		cp xminesweep.1x /usr/man/man1
		gzip /usr/man/man1/xminesweep.1x
