From bcc689cc2b310f32450d69a237a1bbbce5539374 Mon Sep 17 00:00:00 2001 From: Albert Cahalan Date: Sat, 24 May 2008 06:58:22 +0000 Subject: [PATCH] rename magic/Makefile targets to clean up the namespace for future non-recursive make --- Makefile | 4 ++-- magic/Makefile | 33 +++++++++++++-------------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 957b920dd..3fdd1e692 100644 --- a/Makefile +++ b/Makefile @@ -644,7 +644,7 @@ clean: @-rm -f src/tp_magic_api.h @-rm -f tp-magic-config @if [ -d trans ]; then rmdir trans; fi - @cd magic && make clean$(TARGET_PASSTHRU) + @cd magic && make buildmagic-clean$(TARGET_PASSTHRU) @echo .PHONY: clean-win32 @@ -1106,7 +1106,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 $(TARGET_PASSTHRU) + @cd magic && make buildmagic-$(TARGET_PASSTHRU) src/tp_magic_api.h: src/tp_magic_api.h.in diff --git a/magic/Makefile b/magic/Makefile index 72aad9676..3acc0ba01 100644 --- a/magic/Makefile +++ b/magic/Makefile @@ -31,8 +31,8 @@ SDL_LIBS:=-L/usr/local/lib -lmingw32 -lSDL -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB MAGIC_C:=$(wildcard src/*.c) MAGIC_SO:=$(patsubst src/%.c,%.$(SO_TYPE),$(MAGIC_C)) -.PHONY: all -all: $(MAGIC_SO) +.PHONY: buildmagic-all +buildmagic-all: $(MAGIC_SO) $(MAGIC_SO): %.$(SO_TYPE): src/%.c $(CC) $(CFLAGS) $(SHARED_FLAGS) -o $@ $< $(PLUGIN_LIBS) @@ -40,35 +40,28 @@ $(MAGIC_SO): %.$(SO_TYPE): src/%.c # split plug-in CFLAGS from normal CFLAGS. # $(CC) $(PLUG_CPPFLAGS) $(PLUG_CFLAGS) $(PLUG_LDFLAGS) -o $@ $< $(PLUG_LIBS) - -.PHONY: install -install: - cd .. ; make install-magic-plugins - -.PHONY: clean -clean: +.PHONY: buildmagic-clean +buildmagic-clean: @echo @echo "Cleaning up the Magic plug-ins directory ($(PWD))" @-rm -f *.$(SO_TYPE) - # beos versions of the targets -.PHONY: beos -beos: - make \ +.PHONY: buildmagic-beos +buildmagic-beos: + make buildmagic-all \ SO_TYPE:=so \ PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS) $(SDL_CFLAGS) $(TP_MAGIC_CFLAGS)" # win32 versions of the targets -.PHONY: cleanwin32 -cleanwin32: - make clean \ +.PHONY: buildmagic-cleanwin32 +buildmagic-cleanwin32: + make buildmagic-clean \ SO_TYPE:=dll -.PHONY: win32 -win32: - make \ +.PHONY: buildmagic-win32 +buildmagic-win32: + make buildmagic-all \ SO_TYPE:=dll \ PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS)" \ -