Update Makefile
authorH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 12 Sep 2014 20:51:34 +0000 (22:51 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 12 Sep 2014 20:51:34 +0000 (22:51 +0200)
Let Makefile install logo and plugin-spec file for new GUI auto-install
system. Also apply Debian patch regarding LDFLAGS and CPPFLAGS.

Makefile

index ef2cc0a..5de3e52 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,22 +11,26 @@ ALL= fairymax shamax maxqi fairymax.6.gz
 all: ${ALL}
 
 fairymax: fairymax.c
-       $(CC) $(CFLAGS) -DINI_FILE=\"${INI_F}\" fairymax.c -o fairymax
+       $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -DINI_FILE=\"${INI_F}\" fairymax.c -o fairymax
 
 shamax: fairymax.c
-       $(CC) $(CFLAGS) -DINI_FILE=\"${INI_F}\" -DSHATRANJ fairymax.c -o shamax
+       $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -DINI_FILE=\"${INI_F}\" -DSHATRANJ fairymax.c -o shamax
 
 maxqi: maxqi.c
-       $(CC) $(CFLAGS) -DINI_FILE=\"${INI_Q}\" maxqi.c -o maxqi
+       $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -DINI_FILE=\"${INI_Q}\" maxqi.c -o maxqi
 
 install: ${ALL} ${srcdir}/data/*
        cp -u ${srcdir}/fairymax $(DESTDIR)/usr/games
        cp -u ${srcdir}/shamax $(DESTDIR)/usr/games
        cp -u ${srcdir}/maxqi $(DESTDIR)/usr/games
        install -d -m0755 $(DESTDIR)/usr/share/games/fairymax
-       cp -u ${srcdir}/data/* $(DESTDIR)/usr/share/games/fairymax
+       cp -u ${srcdir}/data/fmax.ini ${srcdir}/data/qmax.ini $(DESTDIR)/usr/share/games/fairymax
        install -d -m0755 $(DESTDIR)/usr/share/man/man6
        cp -u ${srcdir}/fairymax.6.gz $(DESTDIR)/usr/share/man/man6
+       install -d -m0755 $(DESTDIR)/usr/share/games/plugins/logos
+       cp -u ${srcdir}/data/fairymax.png $(DESTDIR)/usr/share/games/plugins/logos
+       install -d -m0755 $(DESTDIR)/usr/share/games/plugins/xboard
+       cp -u ${srcdir}/data/fairymax.eng $(DESTDIR)/usr/share/games/plugins/xboard
 
 fairymax.6.gz: fairymax.pod
        pod2man -s 6 fairymax.pod > fmax.man
@@ -55,6 +59,8 @@ dist:
        rmdir Fairy-Max
 
 uninstall:
+       rm -f $(DESTDIR)/usr/share/games/plugins/logos/fairymax.png
+       rm -f $(DESTDIR)/usr/share/games/plugins/xboard/fairymax.eng
        rm -f $(DESTDIR)/usr/share/games/fairymax/*
        rmdir $(DESTDIR)/usr/share/games/fairymax
        rm -f $(DESTDIR)/usr/share/man/man6/fairymax.6.gz