#
# Makefile for XDrawDemo,
# a demonstration for the XawPlus 3.0 Drawing Area widget.
#
# Roland Krause 2000
# rokrause@aol.com
#

LIB_PATH =	-L../../XawPlus -L/usr/X11/lib
INC_PATH =	-I../../XawPlus -I/usr/X11/include
LIBRARIES =	-lXawPlus -lXmu -lXext -lXt -lXpm -lX11

CC =		gcc
FLAGS =		-ansi -O2 -m486

all:		prog install
prog:		xdrawdemo

# --- Clean up

clean:
		rm -f *.o xdrawdemo

# --- Demonstration for the drawing area widget

xdrawdemo:	xdrawdemo.o
		$(CC) -o xdrawdemo $(LIB_PATH) xdrawdemo.o $(LIBRARIES)
		strip xdrawdemo

xdrawdemo.o:	xdrawdemo.c
		$(CC) $(FLAGS) $(INC_PATH) -c xdrawdemo.c

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

install:
		cp xdrawdemo /usr/X11/bin
		mkdir -p /usr/X11/include/X11/pixmaps
		cp *.xpm /usr/X11/include/X11/pixmaps
