aboutsummaryrefslogtreecommitdiff
path: root/examples/Blink3rdPartyLib/Makefile
diff options
context:
space:
mode:
authorSudar Muthu <sudar@sudarmuthu.com>2018-10-07 11:19:56 +0530
committerGitHub <noreply@github.com>2018-10-07 11:19:56 +0530
commit5a0c80bf0c8fbfd5a997998a7c08ba9596c72a3f (patch)
treebeea7a066fd1a2a7af74f2fc4447f8b26a34f631 /examples/Blink3rdPartyLib/Makefile
parentfe84c591944f74c902466d813fae0d164761dc59 (diff)
parented608ce658e66b8aa98ab0b0c31582468cab588d (diff)
Merge pull request #583 from wingunder/move_core_link_last
Moved CORE_LIB to the last position of the defined linked objects.
Diffstat (limited to 'examples/Blink3rdPartyLib/Makefile')
-rw-r--r--examples/Blink3rdPartyLib/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/Blink3rdPartyLib/Makefile b/examples/Blink3rdPartyLib/Makefile
new file mode 100644
index 0000000..f473dbd
--- /dev/null
+++ b/examples/Blink3rdPartyLib/Makefile
@@ -0,0 +1,24 @@
+# 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