summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-21 01:25:49 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-21 01:26:31 -0300
commit67e532a767139a5bfa018959c67d865c0ce2b282 (patch)
tree37ac8bbc53c51253d8eecd39dbbae156f7c8bfd3 /Makefile
parent1e9a00d75484668e08350e4af4cf92960287361f (diff)
downloadeeshow-67e532a767139a5bfa018959c67d865c0ce2b282.tar.gz
eeshow-67e532a767139a5bfa018959c67d865c0ce2b282.tar.bz2
eeshow-67e532a767139a5bfa018959c67d865c0ce2b282.zip
eeshow/: add icon loader and icons for "delta" and "diff"
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5a6d0a7..6dc7654 100644
--- a/Makefile
+++ b/Makefile
@@ -10,18 +10,22 @@
# (at your option) any later version.
#
+SHELL = /bin/bash
+
NAME = eeshow
OBJS = main.o version.o \
kicad/sch-parse.o kicad/sch-render.o kicad/lib-parse.o \
kicad/lib-render.o kicad/dwg.o kicad/delta.o \
gui/gui.o gui/over.o gui/style.o gui/aoi.o gui/fmt-pango.o gui/input.o \
gui/progress.o gui/glabel.o gui/sheet.o gui/history.o gui/render.o \
- gui/help.o \
+ gui/help.o gui/icons.o \
file/file.o file/git-util.o file/git-file.o file/git-hist.o \
gfx/style.o gfx/fig.o gfx/record.o gfx/cro.o gfx/diff.o gfx/gfx.o \
gfx/text.o gfx/misc.o \
misc/diag.o
+ICONS = delta diff
+
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow \
-Wmissing-prototypes -Wmissing-declarations \
-I. \
@@ -64,6 +68,17 @@ gui/help.c: help.inc
clean::
rm -f help.inc
+icons/%.hex: icons/%.fig
+ $(BUILD) fig2dev -L png -S 4 -Z 0.48 $< | \
+ convert - -transparent white - | \
+ hexdump -v -e '/1 "0x%x, "' >$@; \
+ [ "$${PIPESTATUS[*]}" = "0 0 0" ] || { rm -f $@; exit 1; }
+
+gui/icons.c: $(ICONS:%=icons/%.hex)
+
+clean::
+ rm -f $(ICONS:%=icons/%.hex)
+
#----- Test sheet -------------------------------------------------------------
sch: