use MAKEFILE_LIST to get the name of the top make file
this way we dont assume the make file is 'Makefile' so it will work if named 'makefile'
This commit is contained in:
parent
51f1271b32
commit
65115b6f74
1 changed files with 3 additions and 2 deletions
|
@ -877,10 +877,11 @@ $(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.c
|
|||
@$(MKDIR) $(dir $@)
|
||||
$(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@
|
||||
|
||||
USER_MAKEFILE := $(firstword $(MAKEFILE_LIST))
|
||||
ifdef COMMON_DEPS
|
||||
COMMON_DEPS := $(COMMON_DEPS) Makefile
|
||||
COMMON_DEPS := $(COMMON_DEPS) $(USER_MAKEFILE)
|
||||
else
|
||||
COMMON_DEPS := Makefile
|
||||
COMMON_DEPS := $(USER_MAKEFILE)
|
||||
endif
|
||||
|
||||
# normal local sources
|
||||
|
|
Loading…
Add table
Reference in a new issue