summaryrefslogtreecommitdiff
path: root/package/wiringPi/Makefile
blob: 1ce42d66c2abdfb9449023854aaa9a059e378fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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
PKG_VERSION:=		72b2af231be337d45a557ce6ca3ed1eeb6675ffd
PKG_GIT:=		hash
PKG_RELEASE:=		2
PKG_DESCR:=		gpio access library for the raspberry pi
PKG_SECTION:=		libs/misc
PKG_NEEDS:=		threads
PKG_URL:=		http://wiringpi.com/
PKG_SITES:=		git://git.drogon.net/wiringPi
PKG_LIBNAME:=		wiringpi

PKG_SYSTEM_DEPENDS:=    raspberry-pi raspberry-pi2

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
TARGET_CPPFLAGS+=	-D_GNU_SOURCE

do-build:
	(cd $(WRKBUILD); $(MAKE) -C wiringPi)
	(cd $(WRKBUILD); $(MAKE) -C devLib)
	(cd $(WRKBUILD); $(MAKE) -C gpio)

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
	$(INSTALL_DIR) $(IDIR_WIRINGPI)/usr/bin
	$(INSTALL_BIN) $(WRKBUILD)/gpio/gpio $(IDIR_WIRINGPI)/usr/bin
	$(CP) $(WRKBUILD)/wiringPi/*.h $(STAGING_TARGET_DIR)/usr/include
	$(CP) $(WRKBUILD)/wiringPi/libwiringPi.so* $(STAGING_TARGET_DIR)/usr/lib
	$(CP) $(WRKBUILD)/devLib/libwiringPiDev.so* $(STAGING_TARGET_DIR)/usr/lib

include ${ADK_TOPDIR}/mk/pkg-bottom.mk