2 # Makefile for XShogi, part of GNU shogi.
4 # Copyright (c) 1993 Matthias Mutz
5 # Copyright (c) 1998, 1999 Michael C. Vanier and the Free Software Foundation
7 # XShogi 1.1 is based on XBoard 2.0
8 # Copyright (c) 1992 Free Software Foundation
10 # This file is part of XShogi.
12 # XShogi is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 1, or (at your option)
17 # XShogi is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with XShogi; see the file COPYING. If not, write to
24 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
28 # xshogi is the X Windows-based user interface for GNU Shogi.
34 INSTALL_DATA = @INSTALL_DATA@
35 INSTALL_PROGRAM = @INSTALL_PROGRAM@
40 # Installation directories.
44 BINDIR = $(prefix)/bin
45 MANDIR = $(prefix)/man/man6
57 # C compiler and compiler options.
61 XINCLUDES = @X_CFLAGS@
62 CWARNINGS = @WARNINGS@
63 CEXTRAFLAGS = @CEXTRAFLAGS@
64 CFLAGS = @CFLAGS@ $(CEXTRAFLAGS) $(XINCLUDES) -I..
66 XLIBS = @X_LIBS@ -lXaw -lXmu -lXt -lXext -lX11
67 LDFLAGS = $(XLIBS) $(LIBS)
71 FIRST_SHOGI_PROGRAM = -DFIRST_SHOGI_PROGRAM=\"@FIRST_SHOGI_PROGRAM@\"
72 SECOND_SHOGI_PROGRAM = -DSECOND_SHOGI_PROGRAM=\"@SECOND_SHOGI_PROGRAM@\"
73 FIRST_HOST = -DFIRST_HOST=\"@FIRST_HOST@\"
74 SECOND_HOST = -DSECOND_HOST=\"@SECOND_HOST@\"
84 $(CC) -o xshogi xshogi.o parser.o $(CFLAGS) $(LDFLAGS)
87 $(CC) -c xshogi.c $(CWARNINGS) $(CFLAGS) \
88 $(OPT) $(FIRST_SHOGI_PROGRAM) $(SECOND_SHOGI_PROGRAM) \
89 $(FIRST_HOST) $(SECOND_HOST)
93 # Regenerate the parser. NOTE: scanner.c is never compiled; it
94 # is #included into parser.y.
98 $(CC) -c parser.c $(CFLAGS)
106 mv lex.yy.c scanner.c
122 $(INSTALL_PROGRAM) -d $(BINDIR)
123 $(INSTALL_PROGRAM) -d $(MANDIR)
124 $(INSTALL_PROGRAM) xshogi $(BINDIR)
125 $(INSTALL_DATA) $(ROOT)/doc/xshogi.6 $(MANDIR)
132 CLEANFILES = xshogi *.o parser.c y.tab.c scanner.c lex.yy.c
135 for file in $(CLEANFILES); do \
136 if [ -f $$file ]; then rm $$file; fi; \
144 xshogi: xshogi.o parser.o
145 xshogi.o: xshogi.c sysdeps.h xshogi.h bitmaps.h ../version.h ../config.h
146 parser.o: parser.c xshogi.h
147 parser.c: parser.y scanner.c