blob: 25d40a5348ae864170714640529f95ee2873d5af (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
################################################################################
#
# zlib
#
################################################################################
ZLIB_VERSION = 1.2.7
ZLIB_SOURCE =zlib-$(ZLIB_VERSION).tar.bz2
ZLIB_SITE = http://downloads.sourceforge.net/project/libpng/zlib/$(ZLIB_VERSION)
ZLIB_LICENSE = zlib license
ZLIB_LICENSE_FILES = README
ZLIB_INSTALL_STAGING = YES
ifeq ($(BR2_PREFER_STATIC_LIB),y)
ZLIB_PIC =
ZLIB_SHARED = --static
else
ZLIB_PIC = -fPIC
ZLIB_SHARED = --shared
endif
define ZLIB_CONFIGURE_CMDS
(cd $(@D); rm -rf config.cache; \
$(TARGET_CONFIGURE_ARGS) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) $(ZLIB_PIC)" \
./configure \
$(ZLIB_SHARED) \
--prefix=/usr \
)
endef
define HOST_ZLIB_CONFIGURE_CMDS
(cd $(@D); rm -rf config.cache; \
$(HOST_CONFIGURE_ARGS) \
$(HOST_CONFIGURE_OPTS) \
./configure \
--prefix="$(HOST_DIR)/usr" \
--sysconfdir="$(HOST_DIR)/etc" \
)
endef
define ZLIB_BUILD_CMDS
$(MAKE1) -C $(@D)
endef
define HOST_ZLIB_BUILD_CMDS
$(MAKE1) -C $(@D)
endef
define ZLIB_INSTALL_STAGING_CMDS
$(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) LDCONFIG=true install
endef
define ZLIB_INSTALL_TARGET_CMDS
$(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) LDCONFIG=true install
endef
define HOST_ZLIB_INSTALL_CMDS
$(MAKE1) -C $(@D) LDCONFIG=true install
endef
define ZLIB_CLEAN_CMDS
-$(MAKE1) -C $(@D) clean
endef
define ZLIB_UNINSTALL_STAGING_CMDS
$(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) uninstall
endef
define ZLIB_UNINSTALL_TARGET_CMDS
$(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) uninstall
endef
define HOST_ZLIB_UNINSTALL_TARGET_CMDS
$(MAKE1) -C $(@D) uninstall
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
|