From: Ilia Mirkin <imirkin@alum.mit.edu>
To: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Subject: [PATCH 2/2] edid-decode: add build rule for emscripten output
Date: Sun, 9 Feb 2020 12:49:37 -0500 [thread overview]
Message-ID: <20200209174937.22844-3-imirkin@alum.mit.edu> (raw)
In-Reply-To: <20200209174937.22844-1-imirkin@alum.mit.edu>
All I can really say is that this works in my current setup. This
current setup was not the first setup I tried, with lots of random
flailing around emscripten and binaryen versions to be compatible with
my LLVM version. Perhaps later emscripten needs slightly different flags
to export functions, who knows.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---
Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Makefile b/Makefile
index 6db6386..49ad39b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
bindir ?= /usr/bin
mandir ?= /usr/share/man
+EMXX ?= em++
+
SOURCES = edid-decode.cpp parse-base-block.cpp parse-cta-block.cpp \
parse-displayid-block.cpp parse-ls-ext-block.cpp \
parse-di-ext-block.cpp parse-vtb-ext-block.cpp
@@ -13,6 +15,9 @@ sha = -DSHA=$(shell if [ -d .git ]; then git rev-parse HEAD ; else printf '"not
edid-decode: $(SOURCES) edid-decode.h Makefile
$(CXX) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(WARN_FLAGS) -g $(sha) -o $@ $(SOURCES) -lm
+edid-decode.js: $(SOURCES) edid-decode.h Makefile
+ $(EMXX) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(WARN_FLAGS) $(sha) -s EXPORTED_FUNCTIONS='["_parse_edid"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' -o $@ $(SOURCES) -lm
+
clean:
rm -f edid-decode
--
2.24.1
prev parent reply other threads:[~2020-02-09 17:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 17:49 [PATCH 0/2] edid-decode: add emscripten support Ilia Mirkin
2020-02-09 17:49 ` [PATCH 1/2] edid-decode: add function to enable usage as a library Ilia Mirkin
2020-02-10 11:23 ` Hans Verkuil
2020-02-10 14:58 ` Ilia Mirkin
2020-02-13 0:48 ` Ilia Mirkin
2020-02-13 7:16 ` Hans Verkuil
2020-02-09 17:49 ` Ilia Mirkin [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=20200209174937.22844-3-imirkin@alum.mit.edu \
--to=imirkin@alum.mit.edu \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@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).