TP-MAGIC-CONFIG(1) | tp-magic-config | TP-MAGIC-CONFIG(1) |
tp-magic-config -- Helps creating 'Magic' tool plugins for Tux Paint(1)
tp-magic-config is a simple shell script that responds with various pieces of information about the currently-installed version of Tux Paint(1) that are useful when building 'Magic' tool plugins.
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o
my_plugin.so
# cp my_plugin.so `tp-magic-config --pluginprefix`
# cp my_plugin_icon.png `tp-magic-config --dataprefix`/images/magic
# cp my_plugin.html `tp-magic-config --plugindocrefix`/html
# cp my_plugin.txt `tp-magic-config --plugindocrefix`
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o
my_plugin.so
$ mkdir -p `tp-magic-config --localpluginprefix`
$ cp my_plugin.so `tp-magic-config --localpluginprefix`
$ mkdir -p `tp-magic-config --localdataprefix`/images/magic
$ cp my_plugin_icon.png `tp-magic-config --localdataprefix`/images/magic
MAGIC_CFLAGS=$(shell tp-magic-config --cflags)
MAGIC_PREFIX=$(shell tp-magic-config --pluginprefix)
MAGIC_DOC_PREFIX=$(shell tp-magic-config --plugindocprefix)
DATA_PREFIX=$(shell tp-magic-config --dataprefix)
all: my_plugin.so
my_plugin.so: my_plugin.c
install: install-so install-data install-docs
install-so:
mkdir -p $(MAGIC_PREFIX)
cp my_plugin.so $(MAGIC_PREFIX)/
chmod 644 $(MAGIC_PREFIX)/my_plugin.so
install-data:
mkdir -p $(DATA_PREFIX)
cp icons/my_plugin_icon.png $(DATA_PREFIX)/images/magic/
chmod 644 $(DATA_PREFIX)/images/magic/my_plugin_icon.png
install-docs:
mkdir -p $(MAGIC_DOC_PREFIX)
cp docs/my_plugin.html $(MAGIC_DOC_PREFIX)/html/
chmod 644 $(MAGIC_DOC_PREFIX)/html/my_plugin.html
cp docs/my_plugin.txt $(MAGIC_DOC_PREFIX)/
chmod 644 $(MAGIC_DOC_PREFIX)/my_plugin.txt
Bill Kendrick. <bill@newbreedsoftware.com>
And documentation within /usr/[local/]share/doc/tuxpaint/.
07 August 2007 | 2007.08.07 |