linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vcgomes@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Vinicius Costa Gomes <vcgomes@gmail.com>
Subject: [PATCH BlueZ v1 15/15] peripheral: Add a Makefile for building a binary using soletta
Date: Tue, 21 Jul 2015 20:16:48 -0300	[thread overview]
Message-ID: <1437520608-22444-16-git-send-email-vcgomes@gmail.com> (raw)
In-Reply-To: <1437520608-22444-1-git-send-email-vcgomes@gmail.com>

Add a sample Makefile using some of the soletta tools for building a
binary linking with the soletta binary implementing the Heartrate Sensor
profile.
---
 peripheral/soletta/Makefile | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 peripheral/soletta/Makefile

diff --git a/peripheral/soletta/Makefile b/peripheral/soletta/Makefile
new file mode 100644
index 0000000..86dbd7d
--- /dev/null
+++ b/peripheral/soletta/Makefile
@@ -0,0 +1,22 @@
+PKG_CONFIG ?= pkg-config
+
+PREFIX=$(shell $(PKG_CONFIG) --variable=prefix soletta)
+DATADIR=$(shell $(PKG_CONFIG) --variable=pkgdatadir  soletta)
+SOLETTA_CFLAGS=$(shell $(PKG_CONFIG) --cflags soletta)
+SOLETTA_LDFLAGS=$(shell $(PKG_CONFIG) --libs soletta)
+SOLETTA_INCLUDEDIR=$(shell $(PKG_CONFIG) --variable=includedir soletta)
+
+GENERATOR=$(PREFIX)/bin/sol-fbp-generator
+
+all: soletta-init main.c
+
+main.c: sol-flow.json heartrate.json heartrate.fbp
+	$(GENERATOR) -c sol-flow.json -j heartrate.json -j $(DATADIR)/flow/descriptions/timer.json heartrate.fbp $@
+
+soletta-init: main.c
+	$(CC) $(CFLAGS) -Os -o $@ $< .libs/heartrate.a $(SOLETTA_CFLAGS) -include $(SOLETTA_INCLUDEDIR)/soletta/timer-gen.h -include heartrate-gen.h $(SOLETTA_LDFLAGS)
+
+clean:
+	@rm main.c soletta-init
+
+.PHONY: clean
-- 
2.4.6


      parent reply	other threads:[~2015-07-21 23:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 23:16 [PATCH BlueZ v1 00/15] Introducing Soletta peripheral node-type Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 01/15] build: Add configure-time checks for soletta Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 02/15] shared: Add a mainloop implementation using soletta Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 03/15] peripheral/gatt: Fix usage of mainloop_ functions Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 04/15] peripheral/gatt: Add a way to external services to register services Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 05/15] peripheral/gap: Fix missing includes Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 06/15] peripheral/gap: Init the gatt_server Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 07/15] peripheral: Disable support for static random addresses Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 08/15] peripheral/gap: Set the discoverable flag in the advertising Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 09/15] peripheral/gatt: Use LOW security level Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 10/15] soletta/heartrate: Add a node-type for the Heartrate profile Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 11/15] .gitignore: Ignore soletta generated files Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 12/15] build: Add heartrate soletta node type to the build system Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 13/15] soletta: Add a sample flow using the heartrate node Vinicius Costa Gomes
2015-07-21 23:16 ` [PATCH BlueZ v1 14/15] peripheral: Add a README for the Soletta support Vinicius Costa Gomes
2015-07-21 23:16 ` Vinicius Costa Gomes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437520608-22444-16-git-send-email-vcgomes@gmail.com \
    --to=vcgomes@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).