Skip to content

Commit

Permalink
Merge pull request #2969 from kaspar030/make_short_filename_define
Browse files Browse the repository at this point in the history
make: introduce __SHORT_FILE__ define
  • Loading branch information
Joakim Gebart committed May 27, 2015
2 parents b7b384d + aed4be3 commit b288457
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,16 @@ CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS)
# compile and generate dependency info

$(OBJC): $(BINDIR)$(MODULE)/%.o: %.c
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
$(AD)$(CC) \
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
$(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)

$(OBJCXX): $(BINDIR)$(MODULE)/%.o: %.cpp
$(AD)$(CXX) $(CXXFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
$(AD)$(CXX) \
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
$(CXXFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)

$(ASMOBJ): $(BINDIR)$(MODULE)/%.o: %.s
$(AD)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
Expand Down

0 comments on commit b288457

Please sign in to comment.