# Let this be defined if you run Linux or the bricks on the board not are
# formed as bricks...
# SYSTEM=-DLINUX

# If your xview and olgx libraries not resides in /usr/lib or whatever is
# your default directory for libraries, define LIBPATH to the right directory.
# LIBPATH=-L/usr/openwin/lib

# If not all of your include files resides in the default path, then define
# the new path with INCLUDEPATH.
# INCLUDEPATH=-I

# If you run X on a mono screen, uncomment the line below.
# MONO=-DMONO_SCREEN

# If don't use GNU C 2.3.3, define this to cc.
CC=gcc
CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -fstrength-reduce -O2 -ansi

DIR=xvsol-1.0/

solitaire: main.o parse.o
	$(CC)  $(SYSTEM) $(CFLAGS) -o solitaire main.o parse.o $(LIBPATH) \
	-lxview -lolgx -lX11

main.o: main.c sol_data.h sol_structs.h main_protos.h
	$(CC) $(MONO) $(SYSTEM) $(CFLAGS) $(INCLUDEPATH) -c main.c

parse.o: parse.c sol_structs.h parse_protos.h
	$(CC) $(SYSTEM) $(CFLAGS) $(INCLUDEPATH) -c parse.c

archive: Makefile COPYING README main.c parse.c sol_data.h sol_structs.h \
	 main_protos.h parse_protos.h .solrc
	cd ..;tar cvfz xvsol-1.0.tar.Z $(DIR)Makefile $(DIR)COPYING $(DIR)README \
	$(DIR)main.c $(DIR)parse.c $(DIR)sol_data.h $(DIR)sol_structs.h \
	$(DIR)main_protos.h $(DIR)parse_protos.h $(DIR).solrc

checkin: main.c parse.c sol_data.h sol_structs.h main_protos.h parse_protos.h
	ci main.c
	ci parse.c
	ci sol_data.h 
	ci sol_structs.h 
	ci main_protos.h 
	ci parse_protos.h 
	ci .solrc
	exit 0

checkout: main.c parse.c sol_data.h sol_structs.h main_protos.h parse_protos.h
	co -l main.c 
	co -l parse.c 
	co -l sol_data.h 
	co -l sol_structs.h 
	co -l main_protos.h 
	co -l parse_protos.h 
	co -l .solrc
	exit 0