Subversion Repositories svnkaklik

Rev

Rev 409 | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
394 kaklik 1
include $(TOPDIR)/rules.mk
388 kaklik 2
PKG_NAME:=hello
394 kaklik 3
PKG_VERSION:=2.1.1
4
PKG_RELEASE:=1
5
PKG_MD5SUM:=70c9ccf9fac07f762c24f2df2290784d
6
PKG_SOURCE_URL:=ftp://ftp.cs.tu-berlin.de/pub/gnu/hello \
7
	http://mirrors.sunsite.dk/gnu/hello \
8
	http://ftp.gnu.org/gnu/hello
9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
10
PKG_CAT:=zcat
11
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
12
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
13
include $(TOPDIR)/package/rules.mk
14
$(eval $(call PKG_template,HELLO,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
15
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
16
	(cd $(PKG_BUILD_DIR); \
17
		$(TARGET_CONFIGURE_OPTS) \
18
		CFLAGS="$(TARGET_CFLAGS)" \
19
		CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
20
		LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
21
		./configure \
22
			CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
23
			CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
24
			LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
25
			LIBS="-luClibc++ -lc -lm -lgcc" \
26
			--target=$(GNU_TARGET_NAME) \
27
			--host=$(GNU_TARGET_NAME) \
28
			--build=$(GNU_HOST_NAME) \
29
			--prefix=/usr \
30
			--without-libiconv-prefix \
31
			--without-libintl-prefix \
32
			--disable-nls \
33
	);
34
	## Add software specific configurable options above
35
	## See : ./configure --help
36
	touch $@
37
$(PKG_BUILD_DIR)/.built:
38
	rm -rf $(PKG_INSTALL_DIR)
39
	mkdir -p $(PKG_INSTALL_DIR)/usr/bin
40
	$(MAKE) -C $(PKG_BUILD_DIR)/src \
41
		$(TARGET_CONFIGURE_OPTS) \
42
		prefix="$(PKG_INSTALL_DIR)/usr"
43
	$(CC) $(PKG_BUILD_DIR)/src/hello $(PKG_INSTALL_DIR)/usr/bin
44
	touch $@
45
$(IPKG_HELLO):
46
	install -d -m0755 $(IDIR_HELLO)/usr/bin
47
	$(CP) $(PKG_INSTALL_DIR)/usr/bin/hello $(IDIR_HELLO)/usr/bin
48
	$(RSTRIP) $(IDIR_HELLO)
49
	$(IPKG_BUILD) $(IDIR_HELLO) $(PACKAGE_DIR)
50
mostlyclean:
51
	make -C $(PKG_BUILD_DIR) clean
52
	rm $(PKG_BUILD_DIR)/.built