]> git.sesse.net Git - pgn-extract/blob - Makefile
Add support for outputting positions in my own bit-packed FEN format.
[pgn-extract] / Makefile
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)
7 #    any later version.
8 #
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.
13 #
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.
17 #
18 #    David Barnes may be contacted as D.J.Barnes@kent.ac.uk
19 #    http://www.cs.kent.ac.uk/people/staff/djb/
20
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\
23         taglines.o
24 DEBUGINFO=-g
25
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.
30
31 # Linux users might need to add -D__linux__ to these in order to
32 # use strcasecmp instead of strcmpi (cf output.c)
33
34 # Mac OS X users might need to add -D__unix__ to CFLAGS
35 # and use CC=cc or CC=gcc
36
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 \
41         -O3
42 CC=gcc
43
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
47 AIX_CC=xlc
48
49 pgn-extract : $(OBJS)
50         $(CC) $(DEBUGINFO) $(OBJS) -o pgn-extract
51
52 purify : $(OBJS)
53         purify $(CC) $(DEBUGINFO) $(OBJS) -o pgn-extract
54
55 clean:
56         rm -f core pgn-extract *.o
57
58 mymalloc.o : mymalloc.c mymalloc.h
59         $(CC) $(CFLAGS) mymalloc.c
60
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
64
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 \
67                 lists.h mymalloc.h
68         $(CC) $(CFLAGS) argsfile.c
69
70 decode.o : decode.c defs.h typedef.h taglist.h lex.h bool.h decode.h lists.h \
71             tokens.h mymalloc.h
72         $(CC) $(CFLAGS) decode.c
73
74 eco.o :  eco.c defs.h lex.h typedef.h map.h bool.h eco.h taglist.h apply.h \
75            mymalloc.h
76         $(CC) $(CFLAGS) eco.c
77
78 end.o : end.c end.h bool.h defs.h typedef.h lines.h tokens.h lex.h mymalloc.h \
79         apply.h grammar.h
80         $(CC) $(CFLAGS) end.c
81
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 \
84             mymalloc.h
85         $(CC) $(CFLAGS) grammar.c
86
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
90
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\
93         output.h
94         $(CC) $(CFLAGS) lex.c
95
96 lines.o : lines.c bool.h lines.h mymalloc.h
97         $(CC) $(CFLAGS) lines.c
98
99 lists.o :  lists.c lists.h taglist.h bool.h defs.h typedef.h mymalloc.h
100         $(CC) $(CFLAGS) lists.c
101
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
106
107 map.o :  map.c defs.h lex.h typedef.h map.h bool.h decode.h taglist.h \
108          mymalloc.h
109         $(CC) $(CFLAGS) map.c
110
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
114
115 fenmatcher.o : fenmatcher.c apply.h bool.h defs.h fenmatcher.h mymalloc.h typedef.h
116         $(CC) $(CFLAGS) fenmatcher.c
117
118 output.o :  output.c output.h taglist.h bool.h typedef.h defs.h lex.h grammar.h\
119             apply.h mymalloc.h
120         $(CC) $(CFLAGS) output.c
121
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
125