Created a '.in' file for tp_magic_api.h header; generating in TP
Makefile. THIS makes the most sense. (I'm tired.)
This commit is contained in:
parent
f1dac48175
commit
f61128527d
4 changed files with 15 additions and 11 deletions
19
Makefile
19
Makefile
|
|
@ -15,7 +15,7 @@
|
||||||
VER_VERSION=0.9.18
|
VER_VERSION=0.9.18
|
||||||
VER_DATE=`date +"%Y-%m-%d"`
|
VER_DATE=`date +"%Y-%m-%d"`
|
||||||
|
|
||||||
include magic/Makefile-apiversion
|
MAGIC_API_VERSION=0x00000001
|
||||||
|
|
||||||
|
|
||||||
# Where to install things:
|
# Where to install things:
|
||||||
|
|
@ -141,7 +141,6 @@ DEFS=-DDATA_PREFIX=\"$(DATA_PREFIX)/\" \
|
||||||
-DCONFDIR=\"$(CONFDIR)/\" \
|
-DCONFDIR=\"$(CONFDIR)/\" \
|
||||||
-DMAGIC_PREFIX=\"$(MAGIC_PREFIX)/\" \
|
-DMAGIC_PREFIX=\"$(MAGIC_PREFIX)/\" \
|
||||||
-DVER_VERSION=\"$(VER_VERSION)\" \
|
-DVER_VERSION=\"$(VER_VERSION)\" \
|
||||||
-DMAGICAPI_VERSION=$(MAGIC_API_VERSION) \
|
|
||||||
-DVER_DATE=\"$(VER_DATE)\" \
|
-DVER_DATE=\"$(VER_DATE)\" \
|
||||||
-D$(MAEMOFLAG)
|
-D$(MAEMOFLAG)
|
||||||
|
|
||||||
|
|
@ -333,7 +332,7 @@ install-magic-plugins:
|
||||||
@cp magic/sounds/*.wav $(DATA_PREFIX)/sounds/magic
|
@cp magic/sounds/*.wav $(DATA_PREFIX)/sounds/magic
|
||||||
@chmod a+r,g-w,o-w $(DATA_PREFIX)/sounds/magic/*.wav
|
@chmod a+r,g-w,o-w $(DATA_PREFIX)/sounds/magic/*.wav
|
||||||
|
|
||||||
install-magic-plugin-dev:
|
install-magic-plugin-dev: src/tp_magic_api.h
|
||||||
@echo
|
@echo
|
||||||
@echo "...Installing Magic Tool plug-in development files and docs..."
|
@echo "...Installing Magic Tool plug-in development files and docs..."
|
||||||
@-rm $(BIN_PREFIX)/tp-magic-config
|
@-rm $(BIN_PREFIX)/tp-magic-config
|
||||||
|
|
@ -476,6 +475,7 @@ clean:
|
||||||
@-rm -f obj/*.o
|
@-rm -f obj/*.o
|
||||||
@#if [ -d obj ]; then rmdir obj; fi
|
@#if [ -d obj ]; then rmdir obj; fi
|
||||||
@-rm -f trans/*.mo
|
@-rm -f trans/*.mo
|
||||||
|
@-rm -f src/tp_magic_api.h
|
||||||
@if [ -d trans ]; then rmdir trans; fi
|
@if [ -d trans ]; then rmdir trans; fi
|
||||||
@cd magic ; make clean
|
@cd magic ; make clean
|
||||||
@echo
|
@echo
|
||||||
|
|
@ -805,7 +805,7 @@ obj/tuxpaint.o: src/tuxpaint.c \
|
||||||
$(ARCH_HEADERS)
|
$(ARCH_HEADERS)
|
||||||
@echo
|
@echo
|
||||||
@echo "...Compiling Tux Paint from source..."
|
@echo "...Compiling Tux Paint from source..."
|
||||||
$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(MOUSE_CFLAGS) $(DEFS) \
|
@$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(MOUSE_CFLAGS) $(DEFS) \
|
||||||
-c src/tuxpaint.c -o obj/tuxpaint.o
|
-c src/tuxpaint.c -o obj/tuxpaint.o
|
||||||
|
|
||||||
obj/i18n.o: src/i18n.c src/i18n.h src/debug.h
|
obj/i18n.o: src/i18n.c src/i18n.h src/debug.h
|
||||||
|
|
@ -901,8 +901,15 @@ obj/resource.o: visualc/resources.rc obj visualc/resource.h
|
||||||
|
|
||||||
# Go into 'magic' subdirectory and buld magic plug-ins
|
# Go into 'magic' subdirectory and buld magic plug-ins
|
||||||
|
|
||||||
magic-plugins:
|
magic-plugins: src/tp_magic_api.h
|
||||||
@cd magic ; make MAGIC_API_VERSION=$(MAGIC_API_VERSION)
|
@cd magic ; make
|
||||||
|
|
||||||
|
|
||||||
|
src/tp_magic_api.h: src/tp_magic_api.h.in
|
||||||
|
@echo
|
||||||
|
@echo "...Generating 'Magic' tool API development header file..."
|
||||||
|
@cat src/tp_magic_api.h.in | sed -e s/__APIVERSION__/$(MAGIC_API_VERSION)/ > src/tp_magic_api.h
|
||||||
|
|
||||||
|
|
||||||
# Make the "obj" directory to throw the object(s) into:
|
# Make the "obj" directory to throw the object(s) into:
|
||||||
# (not necessary any more; bjk 2006.02.20)
|
# (not necessary any more; bjk 2006.02.20)
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,12 @@
|
||||||
# part of Tux Paint base, so "install-plugin-dev" probably hasn't
|
# part of Tux Paint base, so "install-plugin-dev" probably hasn't
|
||||||
# been run yet; hence "-I../src/" to find 'tp_magic_api.h')
|
# been run yet; hence "-I../src/" to find 'tp_magic_api.h')
|
||||||
|
|
||||||
include Makefile-apiversion
|
|
||||||
|
|
||||||
SO_TYPE=so
|
SO_TYPE=so
|
||||||
|
|
||||||
TP_MAGIC_CFLAGS=$(shell sdl-config --cflags) \
|
TP_MAGIC_CFLAGS=$(shell sdl-config --cflags) \
|
||||||
-I../src/ \
|
-I../src/ \
|
||||||
$(shell tp-magic-config --cflags)
|
$(shell tp-magic-config --cflags)
|
||||||
CFLAGS=-g -Wall $(TP_MAGIC_CFLAGS) -DMAGICAPI_VERSION=$(MAGIC_API_VERSION)
|
CFLAGS=-g -Wall $(TP_MAGIC_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
MAGIC_API_VERSION=0x00000001
|
|
||||||
|
|
@ -44,7 +44,7 @@ typedef struct magic_api_t {
|
||||||
void (*hsvtorgb)(float, float, float, Uint8 *, Uint8 *, Uint8 *);
|
void (*hsvtorgb)(float, float, float, Uint8 *, Uint8 *, Uint8 *);
|
||||||
} magic_api;
|
} magic_api;
|
||||||
|
|
||||||
#define TP_MAGIC_API_VERSION MAGICAPI_VERSION
|
#define TP_MAGIC_API_VERSION __APIVERSION__
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue