| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= ustl
|
|---|
| 10 | PKG_VERSION:= 0.8
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= dd59483c327f1bd1356273bc5ae4dde0
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= @SF/ustl
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-0.8-0.tar.bz2
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | FWRT_PACKAGE_USTL:=m
|
|---|
| 20 |
|
|---|
| 21 | $(eval $(call PKG_template,USTL,ustl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 22 |
|
|---|
| 23 | $(WRKBUILD)/.configured:
|
|---|
| 24 | $(CP) ./files/config.h $(WRKBUILD)/
|
|---|
| 25 | $(CP) ./files/Common.mk $(WRKBUILD)/
|
|---|
| 26 | touch $@
|
|---|
| 27 |
|
|---|
| 28 | $(WRKBUILD)/.built:
|
|---|
| 29 | rm -rf $(WRKINST)
|
|---|
| 30 | mkdir -p $(WRKINST)
|
|---|
| 31 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 32 | CROSS="$(TARGET_CROSS)" \
|
|---|
| 33 | OPTFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 34 | DESTDIR="$(WRKINST)" \
|
|---|
| 35 | all install
|
|---|
| 36 | touch $@
|
|---|
| 37 |
|
|---|
| 38 | $(IPKG_USTL):
|
|---|
| 39 | install -d -m0755 $(IDIR_USTL)/usr/lib
|
|---|
| 40 | $(CP) $(WRKINST)/usr/lib/libustl.so.* $(IDIR_USTL)/usr/lib/
|
|---|
| 41 | $(RSTRIP) $(IDIR_USTL)
|
|---|
| 42 | $(IPKG_BUILD) $(IDIR_USTL) $(PACKAGE_DIR)
|
|---|
| 43 |
|
|---|
| 44 | $(STAGING_DIR)/usr/lib/libustl.so: $(WRKBUILD)/.built
|
|---|
| 45 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 46 | $(CP) $(WRKINST)/usr/include/ustl* $(STAGING_DIR)/usr/include/
|
|---|
| 47 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 48 | $(CP) $(WRKINST)/usr/lib/libustl.a $(STAGING_DIR)/usr/lib/
|
|---|
| 49 | $(CP) $(WRKINST)/usr/lib/libustl.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 50 | touch $@
|
|---|
| 51 |
|
|---|
| 52 | install-dev: $(STAGING_DIR)/usr/lib/libustl.so
|
|---|
| 53 |
|
|---|
| 54 | uninstall-dev:
|
|---|
| 55 | rm -rf \
|
|---|
| 56 | $(STAGING_DIR)/usr/include/ustl* \
|
|---|
| 57 | $(STAGING_DIR)/usr/lib/libustl.a \
|
|---|
| 58 | $(STAGING_DIR)/usr/lib/libustl.so* \
|
|---|
| 59 |
|
|---|
| 60 | compile-targets: install-dev
|
|---|
| 61 | clean-targets: uninstall-dev
|
|---|