<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>glow.li: Compiling</title>
        <description>A blog by glow.</description>
        <link>https://glow.li/tags/compiling.xml</link>
        <atom:link href="https://glow.li/tags/compiling.xml" rel="self" type="application/rss+xml"/>
        <generator>Glow.li Builder</generator>
            <item>
        <title>Compile aclock on Termux</title>
        <description>&lt;p&gt;&lt;img src="https://glow.li/media/images/Screenshot-aclock.webp?chash=Iebu8cd86d" alt="Screenshot" title="Screenshot" class="right size-half" loading="lazy" sizes="(max-width:703px) 100vw, 750px" srcset="https://glow.li/media/images/Screenshot-aclock.webp?chash=Iebu8cd86d 1500w, https://glow.li/media/images/1200/Screenshot-aclock.webp?chash=Iebu848627 1200w, https://glow.li/media/images/1000/Screenshot-aclock.webp?chash=Iebu848627 1000w, https://glow.li/media/images/800/Screenshot-aclock.webp?chash=Iebu848627 800w, https://glow.li/media/images/700/Screenshot-aclock.webp?chash=Iebu848627 700w, https://glow.li/media/images/600/Screenshot-aclock.webp?chash=Iebu848627 600w, https://glow.li/media/images/500/Screenshot-aclock.webp?chash=Iebu848627 500w, https://glow.li/media/images/400/Screenshot-aclock.webp?chash=Iebu848627 400w, https://glow.li/media/images/300/Screenshot-aclock.webp?chash=Iebu8e2c42 300w, https://glow.li/media/images/200/Screenshot-aclock.webp?chash=Iebu819fe2 200w, https://glow.li/media/images/100/Screenshot-aclock.webp?chash=Iebu8a69b4 100w" &gt;
&lt;a href="https://github.com/tenox7/aclock"&gt;Aclock&lt;/a&gt; is a another clock program, but this time it's an analog clock.&lt;/p&gt;
&lt;p&gt;To compile it on &lt;a href="https://termux.dev/"&gt;Termux&lt;/a&gt; you'll need to downloaded the source.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wget https://raw.githubusercontent.com/tenox7/aclock/master/sources/aclock-unix-curses.c&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You'll also need the &lt;code&gt;ncurses-dev&lt;/code&gt; package.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apt install ncurses-dev&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now you simply have to compile it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gcc aclock-unix-curses.c -o aclock -lncurses -lm&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that you can simply run it with &lt;code&gt;./aclock&lt;/code&gt;.&lt;/p&gt;</description>
    <pubDate>Sun, 17 Jan 2016 00:00:00 +0000</pubDate>
    <link>https://glow.li/posts/compiling-aclock-on-termux/</link>
    <guid isPermaLink="false">1452988800</guid>
</item>

<item>
        <title>Compile Stag on Termux</title>
        <description>&lt;p&gt;&lt;strong&gt;This post is now obsolete. You can install &lt;code&gt;stag&lt;/code&gt; from the repository.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/seenaburns/stag"&gt;Stag&lt;/a&gt; is a cool little programm that generates a bar graph.
&lt;img src="https://glow.li/media/images/Screenshot-STAG-1.webp?chash=Iebu8f0aba" alt="Sreenshot" title="Sreenshot" class="size-half" loading="lazy" sizes="(max-width:703px) 100vw, 750px" srcset="https://glow.li/media/images/Screenshot-STAG-1.webp?chash=Iebu8f0aba 1500w, https://glow.li/media/images/1200/Screenshot-STAG-1.webp?chash=Iebu83b5a9 1200w, https://glow.li/media/images/1000/Screenshot-STAG-1.webp?chash=Iebu83b5a9 1000w, https://glow.li/media/images/800/Screenshot-STAG-1.webp?chash=Iebu83b5a9 800w, https://glow.li/media/images/700/Screenshot-STAG-1.webp?chash=Iebu83b5a9 700w, https://glow.li/media/images/600/Screenshot-STAG-1.webp?chash=Iebu83b5a9 600w, https://glow.li/media/images/500/Screenshot-STAG-1.webp?chash=Iebu83b5a9 500w, https://glow.li/media/images/400/Screenshot-STAG-1.webp?chash=Iebu83b5a9 400w, https://glow.li/media/images/300/Screenshot-STAG-1.webp?chash=Iebu898353 300w, https://glow.li/media/images/200/Screenshot-STAG-1.webp?chash=Iebu8cb80b 200w, https://glow.li/media/images/100/Screenshot-STAG-1.webp?chash=Iebu8cf1a8 100w" &gt;&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;img src="https://glow.li/media/images/Screenshot-STAG-2.webp?chash=Iebu8a85e5" alt="Screemshot" title="Screemshot" class="size-half" loading="lazy" sizes="(max-width:703px) 100vw, 750px" srcset="https://glow.li/media/images/Screenshot-STAG-2.webp?chash=Iebu8a85e5 1500w, https://glow.li/media/images/1200/Screenshot-STAG-2.webp?chash=Iebu83f17e 1200w, https://glow.li/media/images/1000/Screenshot-STAG-2.webp?chash=Iebu83f17e 1000w, https://glow.li/media/images/800/Screenshot-STAG-2.webp?chash=Iebu83f17e 800w, https://glow.li/media/images/700/Screenshot-STAG-2.webp?chash=Iebu83f17e 700w, https://glow.li/media/images/600/Screenshot-STAG-2.webp?chash=Iebu83f17e 600w, https://glow.li/media/images/500/Screenshot-STAG-2.webp?chash=Iebu83f17e 500w, https://glow.li/media/images/400/Screenshot-STAG-2.webp?chash=Iebu83f17e 400w, https://glow.li/media/images/300/Screenshot-STAG-2.webp?chash=Iebu85cff8 300w, https://glow.li/media/images/200/Screenshot-STAG-2.webp?chash=Iebu8c31f3 200w, https://glow.li/media/images/100/Screenshot-STAG-2.webp?chash=Iebu88ae88 100w" &gt;&lt;/p&gt;
&lt;p&gt;To compile it on &lt;a href="https://termux.dev/"&gt;Termux&lt;/a&gt; you'll need to downloaded the sources from GitHub.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/seenaburns/stag.git&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To compile you need to install the &lt;code&gt;ncurses-dev&lt;/code&gt; package.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apt install ncurses-dev&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Open the stag.c file and change line 90 from &lt;code&gt;char opt&lt;/code&gt; to &lt;code&gt;signed char opt&lt;/code&gt;, otherwise it will throw an error during compilation. You'll also need to make a change to the Makefile, so that the right compiler is used. Change line 1 from &lt;code&gt;CC ?= gcc&lt;/code&gt; to &lt;code&gt;cc = gcc&lt;/code&gt;.
After that you can simply use &lt;code&gt;make&lt;/code&gt; to compile and install it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;make
make install&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="Examples" name="Examples"&gt;&lt;a class="hash-link" href="#Examples"&gt;Examples&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="CPU+usage+statisitc" name="CPU+usage+statisitc"&gt;&lt;a class="hash-link" href="#CPU+usage+statisitc"&gt;CPU usage statisitc&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;while true; do top -bn1 | grep "CPU:" -m 1 | cut -f1 -d"." | cut -f2 -d" " ;sleep 1; done | stag -t "CPU"&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="Android+battery+status" name="Android+battery+status"&gt;&lt;a class="hash-link" href="#Android+battery+status"&gt;Android battery status&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;while true; do termux-battery-status | jq .percentage;sleep 60; done | stag -t "Battery Stats"&lt;/code&gt;&lt;/pre&gt;</description>
    <pubDate>Sat, 16 Jan 2016 00:00:00 +0000</pubDate>
    <link>https://glow.li/posts/compiling-stag-on-termux/</link>
    <guid isPermaLink="false">1452902400</guid>
</item>

<item>
        <title>Compile tty-clock on Termux</title>
        <description>&lt;p&gt;&lt;strong&gt;This post is now obsolete. You can install &lt;code&gt;tty-clock&lt;/code&gt; from the repository.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://glow.li/media/images/Screenshot-tty-clock.webp?chash=Iebu889fa8" alt="Screenshot" title="Screenshot" class="right size-half" loading="lazy" sizes="(max-width:703px) 100vw, 750px" srcset="https://glow.li/media/images/Screenshot-tty-clock.webp?chash=Iebu889fa8 1500w, https://glow.li/media/images/1200/Screenshot-tty-clock.webp?chash=Iebu8884d3 1200w, https://glow.li/media/images/1000/Screenshot-tty-clock.webp?chash=Iebu8884d3 1000w, https://glow.li/media/images/800/Screenshot-tty-clock.webp?chash=Iebu8884d3 800w, https://glow.li/media/images/700/Screenshot-tty-clock.webp?chash=Iebu8884d3 700w, https://glow.li/media/images/600/Screenshot-tty-clock.webp?chash=Iebu8884d3 600w, https://glow.li/media/images/500/Screenshot-tty-clock.webp?chash=Iebu8884d3 500w, https://glow.li/media/images/400/Screenshot-tty-clock.webp?chash=Iebu8884d3 400w, https://glow.li/media/images/300/Screenshot-tty-clock.webp?chash=Iebu865f03 300w, https://glow.li/media/images/200/Screenshot-tty-clock.webp?chash=Iebu8ed21f 200w, https://glow.li/media/images/100/Screenshot-tty-clock.webp?chash=Iebu80a617 100w" &gt;
&lt;a href="https://github.com/xorg62/tty-clock"&gt;Tty-clock&lt;/a&gt; is a small program that displays a digital clock.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;To compile it on &lt;a href="https://termux.com/"&gt;Termux&lt;/a&gt; you'll need to download the sources from GitHub.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/xorg62/tty-clock.git&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You'll also need the &lt;code&gt;ncurses-dev&lt;/code&gt; package.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apt install ncurses-dev&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Sadly, compiling with &lt;code&gt;make&lt;/code&gt; doesn't really work with this one, I managed to compile it with the following command.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gcc -Wall -Werror -Wextra -std=c99 -pedantic -Wno-unused-parameter -lncurses -o tty-clock ttyclock.c&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can then install it with &lt;code&gt;make install&lt;/code&gt;.&lt;/p&gt;</description>
    <pubDate>Sat, 16 Jan 2016 00:00:00 +0000</pubDate>
    <link>https://glow.li/posts/compiling-tty-clock-on-termux/</link>
    <guid isPermaLink="false">1452902400</guid>
</item>

    </channel>
</rss>

