Skip to content

Commit

Permalink
Fix an inconvenience that everything was a target
Browse files Browse the repository at this point in the history
  • Loading branch information
bastih committed Nov 21, 2013
1 parent 9fe3590 commit 1d6a4e6
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -244,20 +244,17 @@ include makefiles/ci.mk

ci_build: ci_steps

# a noop to keep make happy
%.d :

% :
$(call echo_cmd,LINK $(CXX) $(BLD) $@) $(CXX) $(CXXFLAGS) -o $@ $(filter %.o,$^) -Wl,-whole-archive $(addprefix -l,$(LIBS)) -Wl,-no-whole-archive $(addprefix -L,$(LINK_DIRS)) $(LDFLAGS)

%.a:
$(call echo_cmd,AR $(AR) $@) $(AR) crs $@ $(filter %.o,$?)

%/.fake:
@mkdir -p $(@D)
@touch $@

# Necessary to allow for a second expansio to create dirs
$(RESULT_DIR)/%.a:
$(call echo_cmd,AR $(AR) $@) $(AR) crs $@ $(filter %.o,$?)

$(RESULT_DIR)/%:
$(call echo_cmd,LINK $(CXX) $(BLD) $@) $(CXX) $(CXXFLAGS) -o $@ $(filter %.o,$^) -Wl,-whole-archive $(addprefix -l,$(LIBS)) -Wl,-no-whole-archive $(addprefix -L,$(LINK_DIRS)) $(LDFLAGS)

# Necessary to allow for a second expansion to create dirs
.SECONDEXPANSION:
test: $$(test-tgts)

Expand Down

0 comments on commit 1d6a4e6

Please sign in to comment.