From 6acdba48b732682d3a550755e9a4584bdcf919ac Mon Sep 17 00:00:00 2001 From: meep-eep Date: Fri, 3 Jun 2005 12:06:39 +0000 Subject: [PATCH] Objective C dependency making. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1826 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/Makefile.build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sc2/Makefile.build b/sc2/Makefile.build index 0d04e93fd..39e050e97 100644 --- a/sc2/Makefile.build +++ b/sc2/Makefile.build @@ -20,6 +20,11 @@ define act_mkdep_c $(SED) -e 's,^\(.*\).o:,'"$(@D)"'/\1.c.o:,' > "$@" endef +define act_mkdep_m + $(MKDEPEND) -o - $(CFLAGS) "$<" | \ + $(SED) -e 's,^\(.*\).o:,'"$(@D)"'/\1.m.o:,' > "$@" +endef + define act_windres $(WINDRES) --include-dir $(dir $<) -o "$@" "$<" endef @@ -47,6 +52,13 @@ $(OBJDIR)%.c.d: $(BUILD_ROOT)%.c fi $(call act,act_mkdep_c,MKDEP ,$@) +$(OBJDIR)%.m.d: $(BUILD_ROOT)%.m + @DIR=$(dir $@); \ + if [ ! -d $$DIR ]; then \ + mkdir -p "$$DIR"; \ + fi + $(call act,act_mkdep_m,MKDEP ,$@) + %.rc.o: %.rc @DIR=$(dir $@); \ if [ ! -d $$DIR ]; then \