Improved compatibility with different platforms - and inline documentation.
This commit is contained in:
parent
195cf8cafb
commit
0acdd92457
@ -130,10 +130,6 @@ $(OBJECTDIR)/%.d: %.c
|
|||||||
rm -f $@.$$$$
|
rm -f $@.$$$$
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The line below is needed so that GNU make does not remove the
|
|
||||||
# generated file.
|
|
||||||
.PRECIOUS: %.$(TARGET)
|
|
||||||
|
|
||||||
ifndef LD
|
ifndef LD
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
endif
|
endif
|
||||||
@ -143,7 +139,17 @@ ifndef CUSTOM_RULE_LINK
|
|||||||
$(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} ${filter %.a,$^} $(TARGET_LIBFILES) -o $@
|
$(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} ${filter %.a,$^} $(TARGET_LIBFILES) -o $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The target below looks weird, but I had to add the @ to avoid complaints
|
# Don't treat %.$(TARGET) as an intermediate file because it is
|
||||||
# from GNU make about "*** No rule to make target `XXX'. Stop."
|
# in fact the primary target.
|
||||||
|
.PRECIOUS: %.$(TARGET)
|
||||||
|
|
||||||
|
# Cancel the predefined implict rule for compiling and linking
|
||||||
|
# a single C source into a binary to force GNU make to consider
|
||||||
|
# the match-anything rule below instead.
|
||||||
|
%: %.c
|
||||||
|
|
||||||
|
# Match-anything pattern rule to allow the project makefiles to
|
||||||
|
# abstract from the actual binary name. It needs to contain some
|
||||||
|
# command in order to be a rule, not just a prerequisite.
|
||||||
%: %.$(TARGET)
|
%: %.$(TARGET)
|
||||||
@
|
@
|
||||||
|
Loading…
Reference in New Issue
Block a user