rename magic/Makefile targets to clean up the namespace for future non-recursive make
This commit is contained in:
parent
bcb5f54eb9
commit
bcc689cc2b
2 changed files with 15 additions and 22 deletions
4
Makefile
4
Makefile
|
|
@ -644,7 +644,7 @@ clean:
|
||||||
@-rm -f src/tp_magic_api.h
|
@-rm -f src/tp_magic_api.h
|
||||||
@-rm -f tp-magic-config
|
@-rm -f tp-magic-config
|
||||||
@if [ -d trans ]; then rmdir trans; fi
|
@if [ -d trans ]; then rmdir trans; fi
|
||||||
@cd magic && make clean$(TARGET_PASSTHRU)
|
@cd magic && make buildmagic-clean$(TARGET_PASSTHRU)
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
.PHONY: clean-win32
|
.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
|
# Go into 'magic' subdirectory and buld magic plug-ins
|
||||||
.PHONY: magic-plugins
|
.PHONY: magic-plugins
|
||||||
magic-plugins: src/tp_magic_api.h
|
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
|
src/tp_magic_api.h: src/tp_magic_api.h.in
|
||||||
|
|
|
||||||
|
|
@ -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_C:=$(wildcard src/*.c)
|
||||||
MAGIC_SO:=$(patsubst src/%.c,%.$(SO_TYPE),$(MAGIC_C))
|
MAGIC_SO:=$(patsubst src/%.c,%.$(SO_TYPE),$(MAGIC_C))
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: buildmagic-all
|
||||||
all: $(MAGIC_SO)
|
buildmagic-all: $(MAGIC_SO)
|
||||||
|
|
||||||
$(MAGIC_SO): %.$(SO_TYPE): src/%.c
|
$(MAGIC_SO): %.$(SO_TYPE): src/%.c
|
||||||
$(CC) $(CFLAGS) $(SHARED_FLAGS) -o $@ $< $(PLUGIN_LIBS)
|
$(CC) $(CFLAGS) $(SHARED_FLAGS) -o $@ $< $(PLUGIN_LIBS)
|
||||||
|
|
@ -40,35 +40,28 @@ $(MAGIC_SO): %.$(SO_TYPE): src/%.c
|
||||||
# split plug-in CFLAGS from normal CFLAGS.
|
# split plug-in CFLAGS from normal CFLAGS.
|
||||||
# $(CC) $(PLUG_CPPFLAGS) $(PLUG_CFLAGS) $(PLUG_LDFLAGS) -o $@ $< $(PLUG_LIBS)
|
# $(CC) $(PLUG_CPPFLAGS) $(PLUG_CFLAGS) $(PLUG_LDFLAGS) -o $@ $< $(PLUG_LIBS)
|
||||||
|
|
||||||
|
.PHONY: buildmagic-clean
|
||||||
.PHONY: install
|
buildmagic-clean:
|
||||||
install:
|
|
||||||
cd .. ; make install-magic-plugins
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
@echo
|
@echo
|
||||||
@echo "Cleaning up the Magic plug-ins directory ($(PWD))"
|
@echo "Cleaning up the Magic plug-ins directory ($(PWD))"
|
||||||
@-rm -f *.$(SO_TYPE)
|
@-rm -f *.$(SO_TYPE)
|
||||||
|
|
||||||
|
|
||||||
# beos versions of the targets
|
# beos versions of the targets
|
||||||
.PHONY: beos
|
.PHONY: buildmagic-beos
|
||||||
beos:
|
buildmagic-beos:
|
||||||
make \
|
make buildmagic-all \
|
||||||
SO_TYPE:=so \
|
SO_TYPE:=so \
|
||||||
PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS) $(SDL_CFLAGS) $(TP_MAGIC_CFLAGS)"
|
PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS) $(SDL_CFLAGS) $(TP_MAGIC_CFLAGS)"
|
||||||
|
|
||||||
|
|
||||||
# win32 versions of the targets
|
# win32 versions of the targets
|
||||||
.PHONY: cleanwin32
|
.PHONY: buildmagic-cleanwin32
|
||||||
cleanwin32:
|
buildmagic-cleanwin32:
|
||||||
make clean \
|
make buildmagic-clean \
|
||||||
SO_TYPE:=dll
|
SO_TYPE:=dll
|
||||||
|
|
||||||
.PHONY: win32
|
.PHONY: buildmagic-win32
|
||||||
win32:
|
buildmagic-win32:
|
||||||
make \
|
make buildmagic-all \
|
||||||
SO_TYPE:=dll \
|
SO_TYPE:=dll \
|
||||||
PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS)" \
|
PLUGIN_LIBS:="$(SDL_LIBS) $(ARCH_LINKS)" \
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue