Remove .la libtool library files
[openwrt.git] / openwrt / package / pcre / ipkg / rules
1 #!/usr/bin/make -f
2
3 ifneq ($(strip ${IPKG_RULES_INC}),)
4 include $(IPKG_RULES_INC)
5 endif
6
7 ##
8
9 PKG_VERSION := $(shell cat ./ipkg/version)
10 CURRENT_DIR := $(shell pwd)
11 INSTALL_DIR ?= $(CURRENT_DIR)/ipkg-install
12
13 unexport INSTALL_DIR
14
15 I_LIBPCRE := ipkg/libpcre
16 I_LIBPCRE_DEV := ipkg/libpcre-dev
17
18 BUILD_DEPS := \
19
20 CONFIGURE_OPTS = \
21 --enable-shared \
22 --enable-static \
23 --enable-utf8 \
24
25 ##
26
27 all: package
28
29
30 .stamp-configured: $(BUILD_DEPS)
31
32 rm -rf config.cache
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 ./configure \
36 --target=$(GNU_TARGET_NAME) \
37 --host=$(GNU_TARGET_NAME) \
38 --build=$(GNU_HOST_NAME) \
39 --prefix=/usr \
40 --exec-prefix=/usr \
41 --bindir=/usr/bin \
42 --datadir=/usr/share \
43 --includedir=/usr/include \
44 --infodir=/usr/share/info \
45 --libdir=/usr/lib \
46 --libexecdir=/usr/lib \
47 --localstatedir=/var \
48 --mandir=/usr/share/man \
49 --sbindir=/usr/sbin \
50 --sysconfdir=/etc \
51 $(DISABLE_LARGEFILE) \
52 $(DISABLE_NLS) \
53 $(CONFIGURE_OPTS) \
54
55 touch .stamp-configured
56
57
58 .stamp-built: .stamp-configured
59
60 $(MAKE) \
61 CC_FOR_BUILD="$(HOSTCC)" \
62 LINK_FOR_BUILD="$(HOSTCC)" \
63 CFLAGS_FOR_BUILD="" \
64 dftables
65
66 $(MAKE) \
67 $(TARGET_CONFIGURE_OPTS) \
68 CFLAGS="$(TARGET_CFLAGS)" \
69
70 touch .stamp-built
71
72
73 $(INSTALL_DIR)/usr/include/pcre.h: .stamp-built
74
75 mkdir -p $(INSTALL_DIR)
76
77 $(MAKE) \
78 DESTDIR="$(INSTALL_DIR)" \
79 install
80
81 rm -f $(INSTALL_DIR)/usr/lib/libpcre*.la
82
83
84 configure: .stamp-configured
85
86
87 build: .stamp-built
88
89
90 install: $(INSTALL_DIR)/usr/include/pcre.h
91
92
93 package: $(INSTALL_DIR)/usr/include/pcre.h
94
95 mkdir -p $(I_LIBPCRE)/usr/lib
96 cp -fpR $(INSTALL_DIR)/usr/lib/libpcre*.so.* $(I_LIBPCRE)/usr/lib/
97 $(STRIP) $(I_LIBPCRE)/usr/lib/lib*.so.*
98
99 mkdir -p $(I_LIBPCRE_DEV)/usr/bin
100 cp -fpR $(INSTALL_DIR)/usr/bin/pcre-config $(I_LIBPCRE_DEV)/usr/bin/
101 mkdir -p $(I_LIBPCRE_DEV)/usr/include
102 cp -fpR $(INSTALL_DIR)/usr/include/pcre*.h $(I_LIBPCRE_DEV)/usr/include/
103 mkdir -p $(I_LIBPCRE_DEV)/usr/lib
104 cp -fpR $(INSTALL_DIR)/usr/lib/libpcre*.a $(I_LIBPCRE_DEV)/usr/lib/
105 cp -fpR $(INSTALL_DIR)/usr/lib/libpcre*.so* $(I_LIBPCRE_DEV)/usr/lib/
106
107 chmod 0755 ipkg/*/CONTROL/
108 chmod 0644 ipkg/*/CONTROL/control
109
110 perl -pi -e "s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg/*/CONTROL/control
111 ifneq ($(strip $(PKG_VERSION)),)
112 perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control
113 endif
114
115 $(IPKG_BUILD) $(I_LIBPCRE) $(IPKG_TARGET_DIR)
116 $(IPKG_BUILD) $(I_LIBPCRE_DEV) $(IPKG_TARGET_DIR)
117
118
119 clean:
120
121 -$(MAKE) clean
122
123 rm -rf .stamp-* \
124 $(INSTALL_DIR)/usr/bin/pcre* \
125 $(INSTALL_DIR)/usr/include/pcre* \
126 $(INSTALL_DIR)/usr/lib/libpcre* \
127 $(INSTALL_DIR)/usr/lib/pkgconfig/libpcre.pc \
128 $(INSTALL_DIR)/usr/share/man/man*/pcre* \
129 $(I_LIBPCRE)/usr \
130 $(I_LIBPCRE_DEV)/usr \
131
132
133 control:
134
135 @cat $(I_LIBPCRE)/CONTROL/control
136 @echo
137 @cat $(I_LIBPCRE_DEV)/CONTROL/control
138 @echo
139
140
141 .PHONY: configure build install package clean control
This page took 0.052048 seconds and 5 git commands to generate.