[Buildroot] [PATCH 15/16] mcookie: convert to the GENTARGETS infrastructure
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Wed Aug 31 21:29:23 UTC 2011
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
package/x11r7/mcookie/mcookie.mk | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/package/x11r7/mcookie/mcookie.mk b/package/x11r7/mcookie/mcookie.mk
index 12ef475..d1c4354 100644
--- a/package/x11r7/mcookie/mcookie.mk
+++ b/package/x11r7/mcookie/mcookie.mk
@@ -4,17 +4,19 @@
#
#############################################################
-$(TARGET_DIR)/usr/bin/mcookie: package/x11r7/mcookie/mcookie.c
- $(TARGET_CC) -Wall -Os -s package/x11r7/mcookie/mcookie.c -o $(TARGET_DIR)/usr/bin/mcookie
+# Source included in Buildroot
+MCOOKIE_SOURCE =
+define MCOOKIE_EXTRACT_CMDS
+ cp package/x11r7/mcookie/mcookie.c $(@D)/
+endef
-mcookie: $(TARGET_DIR)/usr/bin/mcookie
+define MCOOKIE_BUILD_CMDS
+ (cd $(@D); $(TARGET_CC) -Wall -Os -s mcookie.c -o mcookie)
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MCOOKIE),y)
-TARGETS+=mcookie
-endif
+define MCOOKIE_TARGET_INSTALL_CMDS
+ install -m 0755 -D $(@D)/mcookie $(TARGET_DIR)/usr/bin/mcookie
+endef
+
+$(eval $(call GENTARGETS))
\ No newline at end of file
--
1.7.4.1
More information about the buildroot
mailing list