2008-10-21 14:38:31 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# memstat
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
MEMSTAT_VERSION:=0.5
|
|
|
|
MEMSTAT_SOURCE:=memstat_$(MEMSTAT_VERSION).tar.gz
|
|
|
|
MEMSTAT_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/memstat
|
|
|
|
MEMSTAT_DIR:=$(BUILD_DIR)/memstat-$(MEMSTAT_VERSION)
|
|
|
|
|
|
|
|
$(DL_DIR)/$(MEMSTAT_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(MEMSTAT_SITE),$(MEMSTAT_SOURCE))
|
2008-10-21 14:38:31 +02:00
|
|
|
|
|
|
|
$(MEMSTAT_DIR)/.unpacked: $(DL_DIR)/$(MEMSTAT_SOURCE)
|
|
|
|
$(ZCAT) $(DL_DIR)/$(MEMSTAT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(MEMSTAT_DIR) package/memstat/ memstat-$(MEMSTAT_VERSION)\*.patch
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(MEMSTAT_DIR)/.configured: $(MEMSTAT_DIR)/.unpacked
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(MEMSTAT_DIR)/memstat: $(MEMSTAT_DIR)/.configured
|
2009-07-21 12:47:38 +02:00
|
|
|
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
|
|
|
|
$(CFLAGS_WHOLE_PROGRAM) $(@D)/memstat.c -o $@
|
2008-10-21 14:38:31 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/bin/memstat: $(MEMSTAT_DIR)/memstat
|
|
|
|
[ -e $(TARGET_DIR)/etc/memstat.conf ] || \
|
2009-07-21 12:47:38 +02:00
|
|
|
$(INSTALL) -m 0644 -D $(^D)/memstat.conf \
|
|
|
|
$(TARGET_DIR)/etc/memstat.conf
|
2008-10-21 14:38:31 +02:00
|
|
|
$(INSTALL) -m 0755 -D $^ $@
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $@
|
|
|
|
|
2009-07-21 12:47:38 +02:00
|
|
|
memstat: $(TARGET_DIR)/usr/bin/memstat
|
2008-10-21 14:38:31 +02:00
|
|
|
|
|
|
|
memstat-source: $(DL_DIR)/$(MEMSTAT_SOURCE)
|
|
|
|
|
|
|
|
memstat-clean:
|
|
|
|
rm -f $(MEMSTAT_DIR)/memstat \
|
|
|
|
$(TARGET_DIR)/etc/memstat.conf $(TARGET_DIR)/usr/bin/memstat
|
|
|
|
|
|
|
|
memstat-dirclean:
|
|
|
|
rm -rf $(MEMSTAT_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MEMSTAT),y)
|
2008-10-21 14:38:31 +02:00
|
|
|
TARGETS+=memstat
|
|
|
|
endif
|