Add plugin-spec file and notice LDFLAGS
authorH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 12 Sep 2014 21:25:49 +0000 (23:25 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 12 Sep 2014 21:25:49 +0000 (23:25 +0200)
A plugin-spec file is added to comply with the GUI auto-install standard.
The Makefile installs this, and now also pays attention to the LDFLAGS.

Makefile
hachu.eng [new file with mode: 0644]

index b76476d..078869c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ ALL= hachu hachu.6.gz
 all: ${ALL}
 
 hachu: hachu.c
-       $(CC) $(CFLAGS) hachu.c -o hachu
+       $(CC) $(CFLAGS) $(LDFLAGS) hachu.c -o hachu
 
 install: ${ALL} ${srcdir}/svg/*
        cp -u ${srcdir}/hachu $(DESTDIR)/usr/games
@@ -19,6 +19,8 @@ install: ${ALL} ${srcdir}/svg/*
        cp -u ${srcdir}/svg/*.svg `xboard --show-config Datadir`/themes/chu
        install -d -m0755 `xboard --show-config Datadir`/themes/conf
        cp -u ${srcdir}/svg/sho ${srcdir}/svg/chu `xboard --show-config Datadir`/themes/conf
+       install -d -m0755 $(DESTDIR)/usr/share/games/plugins/xboard
+       cp -u ${srcdir}/hachu.eng $(DESTDIR)/usr/share/games/plugins/xboard
 
 hachu.6.gz: hachu.pod
        pod2man -s 6 hachu.pod > hachu.man
@@ -36,7 +38,7 @@ dist:
        install -d -m0755 HaChu
        install -d -m0755 HaChu/svg
        rm -f hachu.tar hachu.tar.gz
-       cp hachu.c hachu.pod Makefile HaChu
+       cp hachu.c hachu.pod Makefile hachu.eng HaChu
        cp chu/* HaChu/svg
        (md5sum HaChu/* HaChu/svg/* > HaChu/md5sums) || true
        tar -cvvf hachu.tar HaChu
@@ -49,4 +51,5 @@ dist:
 uninstall:
        rm -f $(DESTDIR)/usr/share/man/man6/hachu.6.gz
        rm -f $(DESTDIR)/usr/games/hachu
+       rm -f $(DESTDIR)/usr/share/games/plugins/xboard/hachu.eng
 
diff --git a/hachu.eng b/hachu.eng
new file mode 100644 (file)
index 0000000..8c4d3b9
--- /dev/null
+++ b/hachu.eng
@@ -0,0 +1,3 @@
+plugin spec 0.0
+hachu
+nocastle,makruk,shatranj,shogi:sho,shogi:chu,shogi:dai