1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/utils/io/Makefile
Hauke Mehrtens b46d21a54e io: Add TARGET_LDFLAGS to fix PIE
Add the OpenWrt TARGET_LDFLAGS to the compile command to activate PIE support
for the io tool when it is activated globally in OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
2019-11-13 23:25:03 +01:00

38 lines
877 B
Makefile

#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=io
PKG_RELEASE:=4
include $(INCLUDE_DIR)/package.mk
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
define Package/io
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Raw memory i/o utility
URL:=http://www.sleepie.demon.co.uk/linuxvme/io.c
endef
define Package/io/description
This tool can be used to access physical memory addresses from userspace.
It can be useful to access hardware for which no device driver exists!
endef
define Build/Compile
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -Wall \
$(PKG_BUILD_DIR)/io.c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
endef
define Package/io/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/io $(1)/usr/bin/
endef
$(eval $(call BuildPackage,io))