# make all	creates all executables for the programs in this directory
#
# make install	installs the executables in the directory specified by BIN
#
# make clean	removes all temporary files.

CFLAGS = -I/usr/X/include
LDFLAGS= -L/usr/X/lib -f

all: xmines

#####################
# CROSS ASSEMBLER   #
#####################

xmines: xmines.o X11.o score.o
	cc -o xmines xmines.o score.o $(LDFLAGS) X11.o -lX11 -lsocket

xmines2: xmines2.o X11.o score2.o
	cc -o xmines xmines.o score2.o $(LDFLAGS) X11.o -lX11 -lsocket

xmines2.o: xmines.c
	cc -c ${CFLAGS} -DSCORE2 xmines.c

xmines3: xmines2.o X11.o score3.o
	cc -o xmines xmines.o score3.o X11.o $(LDFLAGS) -lX11 -lsocket

score3.o: score2.c
	cc -c ${CFLAGS} -o score3.o -DFRAC score2.c

X11.o: covered.xbm flag.xbm gray.xbm highlight.xbm marked.xbm mine.xbm ohno.xbm shades.xbm smiley.xbm uncovered.xbm uncoveredcolor.xbm

clean:
	rm -f *.o
