summaryrefslogtreecommitdiff
path: root/package/wiringPi
diff options
context:
space:
mode:
Diffstat (limited to 'package/wiringPi')
-rw-r--r--package/wiringPi/Makefile41
-rw-r--r--package/wiringPi/patches/patch-devLib_Makefile30
-rw-r--r--package/wiringPi/patches/patch-wiringPi_Makefile29
3 files changed, 100 insertions, 0 deletions
diff --git a/package/wiringPi/Makefile b/package/wiringPi/Makefile
new file mode 100644
index 000000000..5b6a76d6d
--- /dev/null
+++ b/package/wiringPi/Makefile
@@ -0,0 +1,41 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= wiringPi
+# actually git checkout from 05.12.2014
+# 0a9fdeb29d31609ef834f050bdb8a7a65cd35e2b
+PKG_VERSION:= 0.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= e1c9430b80476da2c1de5ef71a795a3d
+PKG_DESCR:= GPIO access library for the BCM2835 used in the Raspberry Pi
+PKG_SECTION:= libs/misc
+PKG_URL:= http://wiringpi.com/
+PKG_SITES:= http://openadk.org/distfiles
+
+PKG_SYSTEM_DEPENDS:= raspberry-pi
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,WIRINGPI,wiringPi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+TARGET_CPPFLAGS+= -I../wiringPi
+
+do-build:
+ (cd $(WRKBUILD); $(MAKE) -C wiringPi)
+ (cd $(WRKBUILD); $(MAKE) -C devLib)
+
+wiringPi-install:
+ $(INSTALL_DIR) $(IDIR_WIRINGPI)/usr/lib
+ $(CP) $(WRKBUILD)/wiringPi/libwiringPi.so* $(IDIR_WIRINGPI)/usr/lib
+ $(CP) $(WRKBUILD)/devLib/libwiringPiDev.so* $(IDIR_WIRINGPI)/usr/lib
+ (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPi.so.2.0 libwiringPi.so)
+ (cd $(IDIR_WIRINGPI)/usr/lib; ln -sf libwiringPiDev.so.2.0 libwiringPiDev.so)
+ $(CP) $(WRKBUILD)/wiringPi/*.h $(STAGING_TARGET_DIR)/usr/include
+
+include ${ADK_TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/wiringPi/patches/patch-devLib_Makefile b/package/wiringPi/patches/patch-devLib_Makefile
new file mode 100644
index 000000000..8fa24bcc1
--- /dev/null
+++ b/package/wiringPi/patches/patch-devLib_Makefile
@@ -0,0 +1,30 @@
+ fix upstream Makefile
+
+--- wiringPi-0.1.orig/devLib/Makefile 2014-12-05 14:48:57.000000000 +0100
++++ wiringPi-0.1/devLib/Makefile 2014-12-05 15:35:35.470864970 +0100
+@@ -32,9 +32,9 @@ DYNAMIC=libwiringPiDev.so.$(VERSION)
+
+ #DEBUG = -g -O0
+ DEBUG = -O2
+-CC = gcc
++CC ?= gcc
+ INCLUDE = -I.
+-CFLAGS = $(DEBUG) -Wformat=2 -Wall $(INCLUDE) -Winline -pipe -fPIC
++CFLAGS ?= -Wformat=2 -Wall $(INCLUDE) -Winline -pipe -fPIC
+
+ LIBS =
+
+@@ -59,11 +59,11 @@ $(STATIC): $(OBJ)
+
+ $(DYNAMIC): $(OBJ)
+ @echo "[Link (Dynamic)]"
+- @$(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
++ $(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
+
+ .c.o:
+ @echo [Compile] $<
+- @$(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
+
+ .PHONY: clean
+ clean:
diff --git a/package/wiringPi/patches/patch-wiringPi_Makefile b/package/wiringPi/patches/patch-wiringPi_Makefile
new file mode 100644
index 000000000..68053af79
--- /dev/null
+++ b/package/wiringPi/patches/patch-wiringPi_Makefile
@@ -0,0 +1,29 @@
+--- wiringPi-0.1.orig/wiringPi/Makefile 2014-12-05 14:48:57.000000000 +0100
++++ wiringPi-0.1/wiringPi/Makefile 2014-12-05 15:38:39.214862303 +0100
+@@ -33,10 +33,10 @@ DYNAMIC=libwiringPi.so.$(VERSION)
+
+ #DEBUG = -g -O0
+ DEBUG = -O2
+-CC = gcc
++CC ?= gcc
+ INCLUDE = -I.
+ DEFS = -D_GNU_SOURCE
+-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
++CFLAGS ?= $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
+
+ LIBS =
+
+@@ -71,11 +71,11 @@ $(STATIC): $(OBJ)
+
+ $(DYNAMIC): $(OBJ)
+ @echo "[Link (Dynamic)]"
+- @$(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
++ $(CC) -shared -Wl,-soname,libwiringPi.so -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
+
+ .c.o:
+ @echo [Compile] $<
+- @$(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
+
+ .PHONY: clean
+ clean: