0001-u8g2-add-RIOT-makefiles.patch 2.02 KB
From 1e2d232135cb2ecbc4ea1668a668b74e242ba3fd Mon Sep 17 00:00:00 2001
From: Peter Kietzmann <peter.kietzmann@haw-hamburg.de>
Date: Wed, 6 Sep 2017 20:23:56 +0200
Subject: [PATCH 1/2] u8g2: add RIOT  makefiles

---
 Makefile                 | 22 ++++++++++++++++++++++
 csrc/Makefile            |  3 +++
 sys/sdl/common/Makefile  |  5 +++++
 sys/utf8/common/Makefile |  3 +++
 4 files changed, 33 insertions(+)
 create mode 100644 Makefile
 create mode 100644 csrc/Makefile
 create mode 100644 sys/sdl/common/Makefile
 create mode 100644 sys/utf8/common/Makefile

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ec64fab
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+DIRS += csrc
+
+# SDL can be used as a virtual display, but is for native target only.
+ifneq (,$(filter u8g2_sdl,$(USEMODULE)))
+  DIRS += sys/sdl/common
+endif
+
+# UTF8 virtual display is not part of core. Therefore it is a separate module.
+ifneq (,$(filter u8g2_utf8,$(USEMODULE)))
+  DIRS += sys/utf8/common
+endif
+
+# Compiling U8g2 will generate a lot of compiler warnings, which are treated
+# as errors. For the sake of simplicity, ignore them.
+CFLAGS += -Wno-empty-translation-unit \
+          -Wno-newline-eof \
+          -Wno-unused-parameter \
+          -Wno-unused \
+          -Wno-overlength-strings \
+          -Wno-pointer-arith
+
+include $(RIOTBASE)/Makefile.base
diff --git a/csrc/Makefile b/csrc/Makefile
new file mode 100644
index 0000000..1023a87
--- /dev/null
+++ b/csrc/Makefile
@@ -0,0 +1,3 @@
+MODULE = u8g2
+
+include $(RIOTBASE)/Makefile.base
diff --git a/sys/sdl/common/Makefile b/sys/sdl/common/Makefile
new file mode 100644
index 0000000..ce8b90b
--- /dev/null
+++ b/sys/sdl/common/Makefile
@@ -0,0 +1,5 @@
+MODULE = u8g2_sdl
+
+CFLAGS += `sdl-config --cflags`
+
+include $(RIOTBASE)/Makefile.base
diff --git a/sys/utf8/common/Makefile b/sys/utf8/common/Makefile
new file mode 100644
index 0000000..32e7913
--- /dev/null
+++ b/sys/utf8/common/Makefile
@@ -0,0 +1,3 @@
+MODULE = u8g2_utf8
+
+include $(RIOTBASE)/Makefile.base
-- 
2.18.2