# Makefile for get/getX11 directory
#
# DEST is where to install the tools 
# RI is the include directory for RLE files
# RL is the library directory (for librle.a)

DEST = ../../../bin
RI = ../../../include
RL = ../../../lib

# -lX11 is X11 support library
LIBES = $(RL)/librle.a -lX11 -lm
CFLAGS = -g $(DFLAGS) $(IFLAGS)
IFLAGS = -I. -I$(RI) -I/usr/local/src/X/X.V11R1/X11 \
	-I/usr/local/src/X/X.V11R1/lib/X
# System V make pays attention to the SHELL environment variable. Override it.
SHELL = /bin/sh

# Executables.  The .out will be stripped off in the install action.

X_C_FILES =\
	annotation.c \
	getX11.c 

X_O_FILES =\
	annotation.o \
	getX11.o

all: getX11.out

# getX11 - read RLE file to X11 display
getX11.out: $(X_O_FILES) 
	${CC} $(CFLAGS) $(X_O_FILES) $(LIBES) -o getX11.new
	mv getX11.new getX11.out

# Incremental install, copies executable to DEST dir.
install: install-pgm
install-pgm: getX11.out
	cp getX11.out $(DEST)/getX11
	touch install-pgm

# Clean up binaries
clean:
	rm -f *.out core *.o errs m.err
