mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
make: introduce RIOT_FILE_NOPATH and RIOT_FILE_RELATIVE
This commit is contained in:
parent
1bd5a82678
commit
aed4be332e
@ -57,10 +57,16 @@ CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS)
|
|||||||
# compile and generate dependency info
|
# compile and generate dependency info
|
||||||
|
|
||||||
$(OBJC): $(BINDIR)$(MODULE)/%.o: %.c
|
$(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
|
$(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
|
$(ASMOBJ): $(BINDIR)$(MODULE)/%.o: %.s
|
||||||
$(AD)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
|
$(AD)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
|
||||||
|
Loading…
Reference in New Issue
Block a user