magic/Makefile became tiny; was merged into main Makefile
This commit is contained in:
parent
3a8cc0a71f
commit
bd18851d95
2 changed files with 35 additions and 67 deletions
39
Makefile
39
Makefile
|
|
@ -619,7 +619,7 @@ bdist-clean:
|
|||
# "make clean" deletes the program, the compiled objects and the
|
||||
# built man page (returns to factory archive, pretty much...)
|
||||
.PHONY: clean
|
||||
clean:
|
||||
clean: buildmagic-clean
|
||||
@echo
|
||||
@echo "Cleaning up the build directory! ($(PWD))"
|
||||
@-rm -f tuxpaint
|
||||
|
|
@ -629,7 +629,6 @@ clean:
|
|||
@-rm -f src/tp_magic_api.h
|
||||
@-rm -f tp-magic-config
|
||||
@if [ -d trans ]; then rmdir trans; fi
|
||||
@cd magic && make buildmagic-clean
|
||||
@echo
|
||||
|
||||
.PHONY: clean-win32
|
||||
|
|
@ -1089,8 +1088,7 @@ obj/resource.o: win32/resources.rc win32/resource.h
|
|||
|
||||
# Go into 'magic' subdirectory and buld magic plug-ins
|
||||
.PHONY: magic-plugins
|
||||
magic-plugins: src/tp_magic_api.h
|
||||
@cd magic && make buildmagic
|
||||
magic-plugins: src/tp_magic_api.h buildmagic
|
||||
|
||||
|
||||
src/tp_magic_api.h: src/tp_magic_api.h.in
|
||||
|
|
@ -1115,3 +1113,36 @@ tp-magic-config: src/tp-magic-config.sh.in Makefile
|
|||
|
||||
obj:
|
||||
@mkdir obj
|
||||
|
||||
######
|
||||
|
||||
MAGIC_SDL_CFLAGS:=$(shell sdl-config --cflags)
|
||||
MAGIC_ARCH_LINKS:=-lintl -lpng12
|
||||
MAGIC_SDL_LIBS:=-L/usr/local/lib -lmingw32 -lSDL -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB)
|
||||
|
||||
windows_PLUGIN_LIBS:="$(MAGIC_SDL_LIBS) $(MAGIC_ARCH_LINKS)"
|
||||
osx_PLUGIN_LIBS:=
|
||||
beos_PLUGIN_LIBS:="$(MAGIC_SDL_LIBS) $(MAGIC_ARCH_LINKS) $(MAGIC_SDL_CFLAGS)"
|
||||
linux_PLUGIN_LIBS:=
|
||||
PLUGIN_LIBS:=$($(OS)_PLUGIN_LIBS)
|
||||
|
||||
#MAGIC_CFLAGS:=-g3 -O2 -fvisibility=hidden -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall $(MAGIC_SDL_CFLAGS) -Isrc/
|
||||
MAGIC_CFLAGS:=-g3 -O2 -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall $(MAGIC_SDL_CFLAGS) -Isrc/
|
||||
SHARED_FLAGS:=-shared -fpic
|
||||
|
||||
MAGIC_C:=$(wildcard magic/src/*.c)
|
||||
MAGIC_SO:=$(patsubst magic/src/%.c,magic/%.$(SO_TYPE),$(MAGIC_C))
|
||||
|
||||
.PHONY: buildmagic
|
||||
buildmagic: $(MAGIC_SO)
|
||||
|
||||
$(MAGIC_SO): magic/%.$(SO_TYPE): magic/src/%.c
|
||||
$(CC) $(MAGIC_CFLAGS) $(SHARED_FLAGS) -o $@ $< $(PLUGIN_LIBS)
|
||||
# Probably should separate the various flags like the following:
|
||||
# $(CC) $(PLUG_CPPFLAGS) $(PLUG_CFLAGS) $(PLUG_LDFLAGS) -o $@ $< $(PLUG_LIBS)
|
||||
|
||||
.PHONY: buildmagic-clean
|
||||
buildmagic-clean:
|
||||
@echo
|
||||
@echo "Cleaning up the Magic plug-ins directory ($(PWD))"
|
||||
@-rm -f magic/*.$(SO_TYPE)
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
# Makefile for Tux Paint default 'Magic' tool plugins
|
||||
|
||||
# Tux Paint - A simple drawing program for children.
|
||||
|
||||
# Copyright (c) 2007-2007 by Bill Kendrick and others
|
||||
# bill@newbreedsoftware.com
|
||||
# http://www.tuxpaint.org/
|
||||
|
||||
# July 2007 - December 29, 2007
|
||||
|
||||
ifneq ($(SystemDrive),)
|
||||
OS:=windows
|
||||
else
|
||||
SYSNAME:=$(shell uname -s)
|
||||
ifeq ($(SYSNAME),Darwin)
|
||||
OS:=osx
|
||||
else ifeq ($(SYSNAME),BeOS)
|
||||
OS:=beos
|
||||
else ifeq ($(SYSNAME),Haiku)
|
||||
OS:=beos
|
||||
else
|
||||
OS:=linux
|
||||
endif
|
||||
endif
|
||||
|
||||
windows_SO_TYPE:=dll
|
||||
osx_SO_TYPE:=bundle
|
||||
beos_SO_TYPE:=so
|
||||
linux_SO_TYPE:=so
|
||||
SO_TYPE:=$($(OS)_SO_TYPE)
|
||||
|
||||
SDL_CFLAGS:=$(shell sdl-config --cflags)
|
||||
SDL_MIXER_LIB:=-lSDL_mixer
|
||||
ARCH_LINKS:=-lintl -lpng12
|
||||
SDL_LIBS:=-L/usr/local/lib -lmingw32 -lSDL -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB)
|
||||
|
||||
windows_PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS)"
|
||||
osx_PLUGIN_LIBS:=
|
||||
beos_PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS) $(SDL_CFLAGS)"
|
||||
linux_PLUGIN_LIBS:=
|
||||
PLUGIN_LIBS:=$($(OS)_PLUGIN_LIBS)
|
||||
|
||||
#CFLAGS:=-g3 -O2 -fvisibility=hidden -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall $(SDL_CFLAGS) -I../src/
|
||||
CFLAGS:=-g3 -O2 -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall $(SDL_CFLAGS) -I../src/
|
||||
SHARED_FLAGS:=-shared -fpic
|
||||
|
||||
MAGIC_C:=$(wildcard src/*.c)
|
||||
MAGIC_SO:=$(patsubst src/%.c,%.$(SO_TYPE),$(MAGIC_C))
|
||||
|
||||
.PHONY: buildmagic
|
||||
buildmagic: $(MAGIC_SO)
|
||||
|
||||
$(MAGIC_SO): %.$(SO_TYPE): src/%.c
|
||||
$(CC) $(CFLAGS) $(SHARED_FLAGS) -o $@ $< $(PLUGIN_LIBS)
|
||||
# Probably should separate the various flags like the following, or at least
|
||||
# split plug-in CFLAGS from normal CFLAGS.
|
||||
# $(CC) $(PLUG_CPPFLAGS) $(PLUG_CFLAGS) $(PLUG_LDFLAGS) -o $@ $< $(PLUG_LIBS)
|
||||
|
||||
.PHONY: buildmagic-clean
|
||||
buildmagic-clean:
|
||||
@echo
|
||||
@echo "Cleaning up the Magic plug-ins directory ($(PWD))"
|
||||
@-rm -f *.$(SO_TYPE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue