OPTS = -Wall -O3 -m486 -fomit-frame-pointer -ffast-math -c

OFILES = mine.o board.o options.o custom.o times.o \
	 faces.o digits.o squares.o menuicon.o \
	 myconfig.o spin.o msgwin.o
GRAPHICS = faces.h digits.h squares.h

mine.exe: $(OFILES)
	gcc -s -o mine.exe $(OFILES) -ltws -lgr

mine.o: mine.cc mine.h board.h options.h times.h myconfig.h msgwin.h \
	 $(GRAPHICS) menuicon.h
	gcc $(OPTS) mine.cc

board.o: board.cc board.h options.h custom.h times.h $(GRAPHICS)
	gcc $(OPTS) board.cc

options.o: options.cc options.h
	gcc $(OPTS) options.cc

custom.o: custom.cc custom.h spin.h
	gcc $(OPTS) custom.cc

times.o: times.cc times.h board.h custom.h options.h
	gcc $(OPTS) times.cc

faces.o: faces.cc faces.h
	gcc $(OPTS) faces.cc

digits.o: digits.cc digits.h
	gcc $(OPTS) digits.cc

squares.o: squares.cc squares.h
	gcc $(OPTS) squares.cc

menuicon.o: menuicon.cc menuicon.h
	gcc $(OPTS) menuicon.cc

myconfig.o: myconfig.cc myconfig.h
	gcc $(OPTS) myconfig.cc

spin.o: spin.cc spin.h
	gcc $(OPTS) spin.cc

msgwin.o: msgwin.cc msgwin.h
	gcc $(OPTS) msgwin.cc
