1 # Make file for the pgn-extract program.
2 # Program: pgn-extract: a Portable Game Notation (PGN) extractor.
3 # Copyright (C) 1994-2014 David Barnes
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 1, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 # David Barnes may be contacted as D.J.Barnes@kent.ac.uk
19 # http://www.cs.kent.ac.uk/people/staff/djb/
21 OBJS=grammar.o lex.o map.o decode.o moves.o lists.o apply.o output.o eco.o\
22 lines.o end.o main.o hashing.o argsfile.o mymalloc.o fenmatcher.o\
26 # These flags are particularly severe on checking warnings.
27 # It may be that they are not all appropriate to your environment.
28 # For instance, not all environments have prototypes available for
29 # the standard library functions.
31 # Linux users might need to add -D__linux__ to these in order to
32 # use strcasecmp instead of strcmpi (cf output.c)
34 # Mac OS X users might need to add -D__unix__ to CFLAGS
35 # and use CC=cc or CC=gcc
37 CFLAGS+=-c -Wall -Wshadow -Wformat -Wpointer-arith \
38 -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings \
39 -Wsign-compare $(DEBUGINFO)\
40 -I/usr/local/lib/ansi-include \
44 # AIX 3.2 Users might like to use these alternatives for CFLAGS and CC.
45 # Thanks to Erol Basturk for providing them.
46 AIX_CFLAGS=-c -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ALL_SOURCE
50 $(CC) $(DEBUGINFO) $(OBJS) -o pgn-extract
53 purify $(CC) $(DEBUGINFO) $(OBJS) -o pgn-extract
56 rm -f core pgn-extract *.o
58 mymalloc.o : mymalloc.c mymalloc.h
59 $(CC) $(CFLAGS) mymalloc.c
61 apply.o : apply.c defs.h lex.h grammar.h typedef.h map.h bool.h apply.h taglist.h\
62 eco.h decode.h moves.h hashing.h mymalloc.h output.h fenmatcher.h
63 $(CC) $(CFLAGS) apply.c
65 argsfile.o : argsfile.c argsfile.h bool.h defs.h typedef.h lines.h \
66 taglist.h tokens.h lex.h taglines.h moves.h eco.h apply.h output.h \
68 $(CC) $(CFLAGS) argsfile.c
70 decode.o : decode.c defs.h typedef.h taglist.h lex.h bool.h decode.h lists.h \
72 $(CC) $(CFLAGS) decode.c
74 eco.o : eco.c defs.h lex.h typedef.h map.h bool.h eco.h taglist.h apply.h \
78 end.o : end.c end.h bool.h defs.h typedef.h lines.h tokens.h lex.h mymalloc.h \
82 grammar.o : grammar.c bool.h defs.h typedef.h lex.h taglist.h map.h lists.h\
83 moves.h apply.h output.h tokens.h eco.h end.h grammar.h hashing.h \
85 $(CC) $(CFLAGS) grammar.c
87 hashing.o : hashing.c hashing.h bool.h defs.h typedef.h tokens.h\
88 taglist.h lex.h mymalloc.h
89 $(CC) $(CFLAGS) hashing.c
91 lex.o : lex.c bool.h defs.h typedef.h tokens.h taglist.h map.h\
92 lists.h decode.h moves.h lines.h grammar.h mymalloc.h apply.h\
96 lines.o : lines.c bool.h lines.h mymalloc.h
97 $(CC) $(CFLAGS) lines.c
99 lists.o : lists.c lists.h taglist.h bool.h defs.h typedef.h mymalloc.h
100 $(CC) $(CFLAGS) lists.c
102 main.o : main.c bool.h defs.h typedef.h tokens.h taglist.h lex.h moves.h\
103 map.h lists.h output.h end.h grammar.h hashing.h \
104 argsfile.h mymalloc.h
105 $(CC) $(CFLAGS) main.c
107 map.o : map.c defs.h lex.h typedef.h map.h bool.h decode.h taglist.h \
109 $(CC) $(CFLAGS) map.c
111 moves.o : moves.c defs.h typedef.h lex.h bool.h map.h lists.h moves.h apply.h\
112 lines.h taglist.h mymalloc.h fenmatcher.h
113 $(CC) $(CFLAGS) moves.c
115 fenmatcher.o : fenmatcher.c apply.h bool.h defs.h fenmatcher.h mymalloc.h typedef.h
116 $(CC) $(CFLAGS) fenmatcher.c
118 output.o : output.c output.h taglist.h bool.h typedef.h defs.h lex.h grammar.h\
120 $(CC) $(CFLAGS) output.c
122 taglines.o : taglines.c bool.h defs.h typedef.h tokens.h taglist.h lex.h lines.h \
123 lists.h moves.h output.h taglines.h
124 $(CC) $(CFLAGS) taglines.c