Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genlink: Add LIBDEPS for libopencm3 itself #887

Closed

Conversation

ChristianTacke
Copy link
Contributor

If $(OPENCM3_DIR)/lib/libopencm3_*.a exists, it will be linked in.
If we do that, we should also add it to the deps.
That way a newer *.a will result in a relink.

If $(OPENCM3_DIR)/lib/libopencm3_*.a exists, it will be linked in.
If we do that, we should also add it to the deps.
That way a newer *.a will result in a relink.
karlp pushed a commit to karlp/libopencm3 that referenced this pull request Jul 29, 2018
If $(OPENCM3_DIR)/lib/libopencm3_*.a exists, it will be linked in.
If we do that, we should also add it to the deps.
That way a newer *.a will result in a relink.

To use this, you should add a dependency to $(LIBDEPS) where you are
using $(LDFLAGS) and $(LDLIBS) now.

eg, old (wouldn't relink if the library changed)

$(PROJECT).elf: $(OBJS) $(LDSCRIPT)
        @printf "  LD\t$@\n"
        $(Q)$(LD) $(TGT_LDFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

new (will relink when the library changes)

$(PROJECT).elf: $(OBJS) $(LDSCRIPT) $(LIBDEPS)
        @printf "  LD\t$@\n"
        $(Q)$(LD) $(TGT_LDFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

Tested-by:  Karl Palsson <karlp@tweak.net.au>

Originally tracked via: libopencm3#887
karlp pushed a commit that referenced this pull request Aug 17, 2018
If $(OPENCM3_DIR)/lib/libopencm3_*.a exists, it will be linked in.
If we do that, we should also add it to the deps.
That way a newer *.a will result in a relink.

To use this, you should add a dependency to $(LIBDEPS) where you are
using $(LDFLAGS) and $(LDLIBS) now.

eg, old (wouldn't relink if the library changed)

$(PROJECT).elf: $(OBJS) $(LDSCRIPT)
        @printf "  LD\t$@\n"
        $(Q)$(LD) $(TGT_LDFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

new (will relink when the library changes)

$(PROJECT).elf: $(OBJS) $(LDSCRIPT) $(LIBDEPS)
        @printf "  LD\t$@\n"
        $(Q)$(LD) $(TGT_LDFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

Tested-by:  Karl Palsson <karlp@tweak.net.au>

Originally tracked via: #887
@karlp
Copy link
Member

karlp commented Apr 3, 2019

merged via rebase in the linked commits above, forgot to close the ticket

@karlp karlp closed this Apr 3, 2019
BOJIT pushed a commit to BOJIT/PlatformIO-libopencm3 that referenced this pull request Jan 30, 2021
If $(OPENCM3_DIR)/lib/libopencm3_*.a exists, it will be linked in.
If we do that, we should also add it to the deps.
That way a newer *.a will result in a relink.

To use this, you should add a dependency to $(LIBDEPS) where you are
using $(LDFLAGS) and $(LDLIBS) now.

eg, old (wouldn't relink if the library changed)

$(PROJECT).elf: $(OBJS) $(LDSCRIPT)
        @printf "  LD\t$@\n"
        $(Q)$(LD) $(TGT_LDFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

new (will relink when the library changes)

$(PROJECT).elf: $(OBJS) $(LDSCRIPT) $(LIBDEPS)
        @printf "  LD\t$@\n"
        $(Q)$(LD) $(TGT_LDFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

Tested-by:  Karl Palsson <karlp@tweak.net.au>

Originally tracked via: libopencm3#887
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants