SHELL = /bin/sh CC = gcc #CC = cc WARNINGS = -ansi -pedantic -Wall -Winline -Wshadow -Wstrict-prototypes\ -Wmissing-declarations #WARNINGS = -Xc #OPTIMIZE = -g OPTIMIZE = -O2 #OPTIMIZE = -fast -xO5 -xtarget=sslx #OPTIMIZE = -fast -xO5 -xtarget=sslx -xprofile=collect #OPTIMIZE = -xprofile=use:chess.profile -fast -xO5 -xtarget=sslx CFLAGS = $(WARNINGS) $(OPTIMIZE) $(OPTIONS) LDFLAGS = # OPTIONS can be any combination of # -DPOSIX -DSANITY_CHECKS -DDEBUG_ALLOCATIONS -DDEBUG_TREE OPTIONS = -DPOSIX -DSANITY_CHECKS # +-------------------------------------+ # | No user serviceable parts below | # +-------------------------------------+ CSOURCE = main.c alloc.c board.c init.c attack.c movegen.c initlang.c\ fgetline.c error.c options.c timing.c OBJECTS = main.o alloc.o board.o init.o attack.o movegen.o initlang.o\ fgetline.o error.o options.o timing.o chess: $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ clean: rm -f *.o *.s gmon.out chess core* *.tgz *.uue rm -f lex.yy.c y.tab.* tgz: cd ..; tar czf chess.tgz chess; mv chess.tgz chess uue: clean tgz uuencode chess.tgz < chess.tgz > chess.tgz.uue Lclint: lclint +skipsysheaders +posixlib +gnuextensions \ $(CSOURCE) lint: lint -hmux -errtags -erroff=E_CONSTANT_CONDITION,E_FUNC_ARG_UNUSED \ $(CSOURCE) chess.txt: doc/chess.1 groff -mandoc -Tascii doc/chess.1 > $@ chess.ps: doc/chess.1 groff -mandoc -Tps doc/chess.1 > $@ depend: awk '{ if ($$0 ~ /^# Dependency list follows/) {exit} else {print}}' \ Makefile > Makefile.tmp echo '# Dependency list follows' >> Makefile.tmp gcc -MM *.c >> Makefile.tmp mv Makefile.tmp Makefile # Dependency list follows alloc.o: alloc.c alloc.h error.h shutup.h attack.o: attack.c attack.h chess.h init.h shutup.h board.o: board.c board.h chess.h error.h init.h initlang.h shutup.h error.o: error.c shutup.h error.h fgetline.o: fgetline.c shutup.h fgetline.h init.o: init.c chess.h init.h shutup.h initlang.o: initlang.c chess.h error.h fgetline.h init.h initlang.h \ shutup.h main.o: main.c alloc.h attack.h chess.h board.h config.h error.h \ fgetline.h init.h initlang.h movegen.h options.h shutup.h timing.h movegen.o: movegen.c chess.h init.h movegen.h options.o: options.c shutup.h options.h timing.o: timing.c config.h error.h timing.h