From: John Hodge Date: Mon, 12 Dec 2011 01:45:16 +0000 (+0800) Subject: Usermode - Fixed bug with clean builds X-Git-Tag: rel0.14~24 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;ds=sidebyside;h=64a28098ee365505c04c0c588b970003d1db1e75;hp=f8168f419a5b83f6875fc0a3044ce8a8b1572b65;p=tpg%2Facess2.git Usermode - Fixed bug with clean builds --- diff --git a/Usermode/rules.mk b/Usermode/rules.mk index 4185287c..123954af 100644 --- a/Usermode/rules.mk +++ b/Usermode/rules.mk @@ -104,22 +104,26 @@ $(foreach f,$(ALL_BIN), $(eval $f: $(EXTRA_DEP-$(_DIR-$f)) $(call fcn_getlibs,$f %.a: $(eval _dir=$(_DIR-$@)) @echo [AR] ru $@ + @mkdir -p $(dir $@) @$(RM) $@ @$(AR) ru $@ $(OBJ-$@) # Dynamic Library (.so) %.so: $(eval _dir=$(_DIR-$@)) @echo [LD] -shared -o $@ + @mkdir -p $(dir $@) @$(LD) $(LDFLAGS) -shared -soname $(notdir $@) -o $@ $(OBJ-$@) $(LDFLAGS-$(_dir)) # Executable (.bin) %.bin: $(eval _dir=$(_DIR-$@)) @echo [LD] -o $@ + @mkdir -p $(dir $@) @$(LD) $(LDFLAGS) -o $@ $(OBJ-$@) $(LDFLAGS-$(_dir)) @$(CP) $@ $(@:%.bin=%) $(OUTPUTDIR)%: $(eval _dir=$(_DIR-$@)) @echo [LD] -o $@ + @mkdir -p $(dir $@) @$(LD) $(LDFLAGS) -o $@ $(OBJ-$@) $(LDFLAGS-$(_dir)) -include $(ALL_OBJ:%=%.dep)