2017-05-28 16:32:53 +00:00
|
|
|
ifneq ($(CC),)
|
2017-04-12 19:27:59 +00:00
|
|
|
O_FILES := $(C_FILES:%.c=$(OUT)/%.$(CROSS)o)
|
|
|
|
D_FILES := $(O_FILES:%o=%d)
|
|
|
|
|
|
|
|
ifneq ($(DEBUG),)
|
|
|
|
$(info TARGET=$(TARGET))
|
|
|
|
$(info C_FILES=$(C_FILES))
|
|
|
|
$(info O_FILES=$(O_FILES))
|
2017-05-21 20:25:02 +00:00
|
|
|
$(info D_FILES=$(D_FILES))
|
2017-04-12 19:27:59 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
CLEAN+=$(O_FILES) $(OUT)/$(TARGET)
|
|
|
|
DIST-CLEAN+=$(D_FILES)
|
|
|
|
|
2017-06-03 10:11:57 +00:00
|
|
|
INCLUDES+=mlibc/include mlibc $(OUT)/$(DIR)
|
2017-05-02 21:30:46 +00:00
|
|
|
|
2017-04-12 19:27:59 +00:00
|
|
|
$(OUT)/$(TARGET): ld:=$(CROSS)LD
|
|
|
|
$(OUT)/$(TARGET): LD:=$(CROSS)$(LD)
|
|
|
|
$(OUT)/$(TARGET): CC:=$(CROSS)$(CC)
|
|
|
|
$(OUT)/$(TARGET): LDFLAGS:=$(LDFLAGS) $(LD_FLAGS) $(LINK)
|
|
|
|
$(OUT)/$(TARGET): O_FILES:=$(O_FILES)
|
|
|
|
$(OUT)/$(TARGET): $(O_FILES)
|
2017-05-21 20:25:02 +00:00
|
|
|
@echo " $(ld) $(notdir $^) -> $(notdir $@)"
|
2017-04-12 19:27:59 +00:00
|
|
|
$(QUIET)$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
|
|
|
|
|
|
|
include make/compile.make
|
2017-05-28 16:32:53 +00:00
|
|
|
endif
|