Makefile 751 B

1234567891011121314151617181920212223242526272829303132333435
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=dfboot
  10. PKG_VERSION:=0.1
  11. PKG_RELEASE:=1
  12. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
  13. include $(INCLUDE_DIR)/package.mk
  14. define Build/Prepare
  15. mkdir -p $(PKG_BUILD_DIR)
  16. $(CP) ./src/* $(PKG_BUILD_DIR)/
  17. endef
  18. define Build/Compile
  19. $(MAKE) -C $(PKG_BUILD_DIR) \
  20. $(TARGET_CONFIGURE_OPTS) \
  21. CFLAGS="$(TARGET_CFLAGS)" \
  22. LDFLAGS="$(LIBGCC_S)"
  23. endef
  24. define Build/InstallDev
  25. dd if=$(PKG_BUILD_DIR)/binary/dfboot.bin of=$(PKG_BUILD_DIR)/binary/dfboot.block bs=32k count=1 conv=sync
  26. endef
  27. $(eval $(call Build/DefaultTargets))