#
# Makefile for bitmap 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 =		Bitmap.o    BitEdit.o   CutPaste.o  Graphics.o \
		Dialog.o    Handlers.o   ReqMach.o 

all:		prog install
prog:		bitmap  bitmap.1x

# --- Clean up

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

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

install:
		cp bitmap /usr/X11/bin
		cp Bitmap /usr/X11/lib/X11/app-defaults
		mkdir -p /usr/X11/include/X11/pixmaps
		cp pixmaps/*.xpm /usr/X11/include/X11/pixmaps
		cp bitmap.1x /usr/man/man1
		gzip /usr/man/man1/bitmap.1x

# --- Build bitmap

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

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

# --- Build the manual

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

