summaryrefslogtreecommitdiffstats
path: root/package/eeprog/eeprog.mk
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2010-04-22 15:35:15 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2010-05-01 15:09:18 +0200
commit558861639cea0b4991ab07313f972187ed644867 (patch)
treeca3ef1552fee9f4a041630f0a5e0ba0a07f30fc0 /package/eeprog/eeprog.mk
parent554ef43a9c1470cb2eebbc2d2f1eea9cfe5648a0 (diff)
downloadbuildroot-novena-558861639cea0b4991ab07313f972187ed644867.tar.gz
buildroot-novena-558861639cea0b4991ab07313f972187ed644867.zip
eeprog: Convert to gentargets
Closes #1615 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/eeprog/eeprog.mk')
-rw-r--r--package/eeprog/eeprog.mk48
1 files changed, 12 insertions, 36 deletions
diff --git a/package/eeprog/eeprog.mk b/package/eeprog/eeprog.mk
index b19c7a3bd..070fcd4b3 100644
--- a/package/eeprog/eeprog.mk
+++ b/package/eeprog/eeprog.mk
@@ -3,44 +3,20 @@
# eeprog
#
#############################################################
-EEPROG_VERSION:=0.7.6
-EEPROG_SOURCE:=eeprog-$(EEPROG_VERSION).tar.gz
-EEPROG_SITE:=http://codesink.org/download
-EEPROG_DIR:=$(BUILD_DIR)/eeprog-$(EEPROG_VERSION)
-EEPROG_BINARY:=eeprog
-EEPROG_TARGET_BINARY:=usr/sbin/eeprog
-$(DL_DIR)/$(EEPROG_SOURCE):
- $(call DOWNLOAD,$(EEPROG_SITE),$(EEPROG_SOURCE))
+EEPROG_VERSION = 0.7.6
+EEPROG_SITE = http://codesink.org/download
-eeprog-source: $(DL_DIR)/$(EEPROG_SOURCE)
+define EEPROG_BUILD_CMDS
+ $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" -C $(@D)
+endef
-$(EEPROG_DIR)/.unpacked: $(DL_DIR)/$(EEPROG_SOURCE)
- $(ZCAT) $(DL_DIR)/$(EEPROG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(EEPROG_DIR) package/eeprog/ eeprog\*.patch
- touch $(EEPROG_DIR)/.unpacked
+define EEPROG_INSTALL_TARGET_CMDS
+ $(INSTALL) -D $(@D)/eeprog $(TARGET_DIR)/usr/bin/eeprog
+endef
-$(EEPROG_DIR)/$(EEPROG_BINARY): $(EEPROG_DIR)/.unpacked
- $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(EEPROG_DIR)
- $(STRIPCMD) $(EEPROG_DIR)/$(EEPROG_BINARY)
+define EEPROG_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/bin/eeprog
+endef
-$(TARGET_DIR)/$(EEPROG_TARGET_BINARY): $(EEPROG_DIR)/$(EEPROG_BINARY)
- $(INSTALL) -m 0755 -D $(EEPROG_DIR)/$(EEPROG_BINARY) $(TARGET_DIR)/$(EEPROG_TARGET_BINARY)
-
-eeprog: $(TARGET_DIR)/$(EEPROG_TARGET_BINARY)
-
-eeprog-clean:
- rm -f $(TARGET_DIR)/$(EEPROG_TARGET_BINARY)
- -$(MAKE) -C $(EEPROG_DIR) clean
-
-eeprog-dirclean:
- rm -rf $(EEPROG_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_EEPROG),y)
-TARGETS+=eeprog
-endif
+$(eval $(call GENTARGETS,package,eeprog))