mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
make: don't call mkdir -p a lot
This commit is contained in:
parent
a9ded6337e
commit
346313bf07
@ -44,8 +44,10 @@ OBJ += $(OBJCXX)
|
||||
DEP = $(SRC:%.c=$(BINDIR)$(MODULE)/%.d)
|
||||
DEP += $(SRCXX:%.cpp=$(BINDIR)$(MODULE)/%.d)
|
||||
|
||||
$(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ) ${DIRS:%=ALL--%}
|
||||
@mkdir -p $(BINDIR)$(MODULE)
|
||||
$(BINDIR)$(MODULE)/:
|
||||
$(AD)mkdir -p $@
|
||||
|
||||
$(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ) ${DIRS:%=ALL--%} $(BINDIR)$(MODULE)/
|
||||
$(AD)$(AR) -rc $(BINDIR)$(MODULE).a $(OBJ) $(ASMOBJ)
|
||||
|
||||
# pull in dependency info for *existing* .o files
|
||||
@ -53,18 +55,14 @@ $(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ) ${DIRS:%=ALL--%}
|
||||
-include $(OBJ:.o=.d)
|
||||
|
||||
# compile and generate dependency info
|
||||
$(BINDIR)$(MODULE)/%.o: %.c
|
||||
@mkdir -p $(BINDIR)$(MODULE)
|
||||
$(BINDIR)$(MODULE)/%.o: %.c $(BINDIR)$(MODULE)/
|
||||
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -MD -MP -c -o $(BINDIR)$(MODULE)/$*.o $(abspath $*.c)
|
||||
|
||||
$(BINDIR)$(MODULE)/%.o: %.cpp
|
||||
@mkdir -p $(BINDIR)$(MODULE)
|
||||
$(BINDIR)$(MODULE)/%.o: %.cpp $(BINDIR)$(MODULE)/
|
||||
$(AD)$(CXX) $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS) $(INCLUDES) -MD -MP -c -o $(BINDIR)$(MODULE)/$*.o $(abspath $*.cpp)
|
||||
|
||||
$(BINDIR)$(MODULE)/%.o: %.s
|
||||
@mkdir -p $(BINDIR)$(MODULE)
|
||||
$(BINDIR)$(MODULE)/%.o: %.s $(BINDIR)$(MODULE)/
|
||||
$(AD)$(AS) $(ASFLAGS) $*.s -o $(BINDIR)$(MODULE)/$*.o
|
||||
|
||||
$(BINDIR)$(MODULE)/%.o: %.S
|
||||
@mkdir -p $(BINDIR)$(MODULE)
|
||||
$(BINDIR)$(MODULE)/%.o: %.S $(BINDIR)$(MODULE)/
|
||||
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -MD -MP -c -o $(BINDIR)$(MODULE)/$*.o $(abspath $*.S)
|
||||
|
Loading…
Reference in New Issue
Block a user