- touch $(GDB_CLIENT_DIR)/.configured
-
-$(GDB_CLIENT_DIR)/gdb/gdb: $(GDB_CLIENT_DIR)/.configured
- $(MAKE) -C $(GDB_CLIENT_DIR)
- strip $(GDB_CLIENT_DIR)/gdb/gdb
-
-$(TARGET_CROSS)gdb: $(GDB_CLIENT_DIR)/gdb/gdb
- install -c $(GDB_CLIENT_DIR)/gdb/gdb $(TARGET_CROSS)gdb
- ln -fs ../../bin/$(REAL_GNU_TARGET_NAME)-gdb \
- $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/gdb
-
-source: $(DL_DIR)/$(GDB_SOURCE)
-prepare: $(GDB_DIR)/.patched
-compile:
-install: $(TARGET_CROSS)gdb
-clean:
- rm -rf $(GDB_CLIENT_DIR)
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)
+ strip $(PKG_BUILD_DIR)/gdb/gdb
+endef
+
+define Build/Install
+ (cd $(STAGING_DIR)/bin; \
+ install -c $(PKG_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb; \
+ ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb; \
+ );
+endef
+
+define Build/Clean
+ rm -rf $(PKG_BUILD_DIR)
+ rm -f $(STAGING_DIR)/bin/$(TARGET_CROSS)gdb
+ rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gdb
+endef
+
+$(eval $(call HostBuild))