Commit b07ead64 authored by Alexander Larsson's avatar Alexander Larsson

Add makerules to turn client.html and broadway.js into #include files

parent ded9bc69
......@@ -20,7 +20,22 @@ libbroadway_la_SOURCES = \
broadway.h \
broadway.c
clienthtml.h: client.html
$(PERL) ./toarray.pl client.html client_html > $@
broadwayjs.h: broadway.js
$(PERL) ./toarray.pl broadway.js broadway_js > $@
# built headers that don't get installed
broadway_built_private_headers = \
clienthtml.h \
broadwayjs.h
broadway_built_sources = \
${broadway_built_private_headers}
libgdk_broadway_la_SOURCES = \
${broadway_built_private_headers}\
gdkapplaunchcontext-broadway.c \
gdkcursor-broadway.c \
gdkdevice-broadway.h \
......@@ -52,6 +67,11 @@ libgdk_broadway_la_SOURCES = \
libgdk_broadway_la_LIBADD = libbroadway.la
MAINTAINERCLEANFILES = $(broadway_built_sources)
EXTRA_DIST += $(broadway_built_sources)
BUILT_SOURCES = $(broadway_built_sources)
noinst_PROGRAMS = broadway-demo
broadway_demo_LDADD = -lz -lcairo libbroadway.la
......
#!/usr/bin/perl -w
my $FILENAME = $ARGV[0];
open FILE, $FILENAME or die "Cannot open $FILENAME";
my $ARRAYNAME = $ARGV[1];
print "static const char $ARRAYNAME\[\] =";
while (<FILE>) {
s@\\@\\\\@g;
s@"@\\"@g;
chomp ($_);
print "\n \"$_\\n\"";
}
print ";\n";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment