Arduino-Makefile/examples/Blink3rdPartyLib/Makefile
Pieter du Preez a285810cb5 Added a test case for moving CORE_LIB in PR #583.
This patch is meant to test the link order, if the OTHER_OBJS
variable gets used to add 3rd party archives, that depend on the
Arduino core lib (the archive pointed to by the CORE_LIB variable).

The examples/Blink3rdPartyLib directory contains a stripped down Blink
and includes a library in the examples/Blink3rdPartyLib/Toggle
sub-directory. The archive, built inside the Toggle directory mimics a
3rd party library. The archive gets built and linked in by using the
OTHER_OBS variable in examples/Blink3rdPartyLib/Makefile.
2018-10-02 23:00:14 +02:00

24 lines
826 B
Makefile

# This program is free software and is licensed under the same conditions as
# describe in https://github.com/sudar/Arduino-Makefile/blob/master/licence.txt
# This is an example Makefile, that demonstrates the linking of a third party
# library. In this case the third party library resides in the ./Toggle
# sub-directory. Note that the archive TOGGLE_ARCHIVE _only_ contains the
# compiled Toggle.c.o object. The TOGGLE_ARCHIVE is thus very lean, but it
# requires the Arduino libraries, which are being build in this directory,
# together with Blink, the 'main' program.
include board.mk
TOGGLE_ARCHIVE = build-$(BOARD_TAG)/libtoggle.a
CXXFLAGS += -IToggle
OTHER_OBJS = Toggle/$(TOGGLE_ARCHIVE)
include ../../Arduino.mk
Toggle/$(TOGGLE_ARCHIVE):
$(MAKE) -C Toggle $(TOGGLE_ARCHIVE)
clean::
$(MAKE) -C Toggle clean