Completed Negative Magic tool as a plugin (except sound).

Created Mirror and Flip Magic tools as plugins (except sound); hooks
added to Magic plugin API to allow starter and starter-undo mirror/flip.
Created Fade and Darken Magic tools as plugins.
Moved magic tool sounds to 'magic'.
Added flip and mirror icons to main Tux Paint UI (used to share magic tools')
Created 'tp-magic-config.sh' to get CFLAGS for compiling magic tool plugins.
Improved magic tool plugin API.
Committed some documentation on magic tool plugin API.
This commit is contained in:
William Kendrick 2007-07-05 19:20:58 +00:00
parent c6aa0af0a9
commit 47e44cb80f
32 changed files with 917 additions and 729 deletions

View file

@ -1,35 +1,40 @@
# Makefile for magic plugins
SDL_CFLAGS=$(shell sdl-config --cflags)
CFLAGS=-g -Wall $(SDL_CFLAGS) -DDATA_PREFIX=\"$(DATA_PREFIX)\"
#-fPIC ?
# Places to pick up Tux Paint Magic Plugin Dev header and SDL headers
# (can't assume plugin dev stuff has been installed yet, since we're
# part of Tux Paint base, so "install-plugin-dev" probably hasn't
# been run yet; hence "-I../src/" to find 'tp_magic_api.h')
all: negative.so
SO_TYPE=so
TP_MAGIC_CFLAGS=$(shell sdl-config --cflags) \
-I../src/ \
$(shell tp-magic-config --cflags)
CFLAGS=-g -Wall $(TP_MAGIC_CFLAGS)
all: negative.$(SO_TYPE) \
fade_darken.$(SO_TYPE) \
mirror_flip.$(SO_TYPE) \
clean:
@echo
@echo "Cleaning up the Magic plug-ins directory ($(PWD))"
@-rm -f *.so
@-rm -f obj/*
@-rm -f *.$(SO_TYPE)
# Negative tool
# ------------------------------------------------------------------------
# Shared objects:
# ---------------
negative.so: obj obj/negative.o obj/magic_helpers.o
@echo "Linking Negative magic tool"
@$(CC) -shared -o negative.so obj/negative.o obj/magic_helpers.o
negative.$(SO_TYPE): src/negative.c
@echo "Building Negative magic tool"
@$(CC) $(CFLAGS) -shared -o negative.$(SO_TYPE) src/negative.c
obj/negative.o: src/negative.c src/magic_helpers.h
@echo "Compiling Negative magic tool"
@$(CC) $(CFLAGS) src/negative.c -c -o obj/negative.o
fade_darken.$(SO_TYPE): src/fade_darken.c
@echo "Building Fade and Darken magic tools"
@$(CC) $(CFLAGS) -shared -o fade_darken.$(SO_TYPE) src/fade_darken.c
obj/magic_helpers.o: src/magic_helpers.c src/magic_helpers.h
@echo "Compiling Magic tool helper routines"
@$(CC) $(CFLAGS) src/magic_helpers.c -c -o obj/magic_helpers.o
obj:
@-mkdir obj
mirror_flip.$(SO_TYPE): src/mirror_flip.c
@echo "Building Mirror and Flip magic tools"
@$(CC) $(CFLAGS) -shared -o mirror_flip.$(SO_TYPE) src/mirror_flip.c