1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #2969 from kaspar030/make_short_filename_define

make: introduce __SHORT_FILE__ define
This commit is contained in:
Joakim Gebart 2015-05-27 16:22:51 +02:00
commit b288457ed5

View File

@ -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 $<)