libsemanage: fix pkgconfig paths
[openwrt/openwrt.git] / tools / mtd-utils / Makefile
1 #
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=mtd-utils
10 PKG_VERSION:=2.1.2
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
15 PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6
16
17 PKG_FIXUP:=autoreconf
18
19 include $(INCLUDE_DIR)/host-build.mk
20
21 ifneq ($(HOST_OS),Linux)
22 HOST_CFLAGS += \
23 -I$(CURDIR)/include \
24 -Dloff_t=off_t \
25 -D__BYTE_ORDER=BYTE_ORDER \
26 -include endian.h \
27 -DNO_NATIVE_SUPPORT \
28 -include fls.h
29 endif
30
31 HOST_CONFIGURE_VARS+= \
32 UUID_CFLAGS="-I$(STAGING_DIR_HOST)/include/e2fsprogs/uuid"
33
34 HOST_CONFIGURE_ARGS+= \
35 --disable-tests \
36 --without-crypto \
37 --without-xattr \
38 --without-zstd \
39 --without-lzo
40
41 HOST_MAKE_FLAGS += \
42 PROGRAMS="mkfs.jffs2 ubinize mkfs.ubifs"
43
44 define Host/Install
45 $(CP) \
46 $(HOST_BUILD_DIR)/mkfs.jffs2 \
47 $(HOST_BUILD_DIR)/mkfs.ubifs \
48 $(HOST_BUILD_DIR)/ubinize \
49 $(STAGING_DIR_HOST)/bin/
50 endef
51
52 define Host/Clean
53 rm -f $(STAGING_DIR_HOST)/bin/{mkfs.jffs2,mkfs.ubifs,ubinize}
54 endef
55
56 $(eval $(call HostBuild))