cache-calibrator.mk 991 B

1234567891011121314151617181920212223242526272829
  1. ################################################################################
  2. #
  3. # cache-calibrator
  4. #
  5. ################################################################################
  6. CACHE_CALIBRATOR_SOURCE = calibrator.c
  7. CACHE_CALIBRATOR_SITE = http://homepages.cwi.nl/~manegold/Calibrator/src
  8. CACHE_CALIBRATOR_LICENSE = Cache calibrator license
  9. CACHE_CALIBRATOR_LICENSE_FILES = calibrator.c.license
  10. define CACHE_CALIBRATOR_EXTRACT_CMDS
  11. cp $(CACHE_CALIBRATOR_DL_DIR)/$(CACHE_CALIBRATOR_SOURCE) $(@D)
  12. endef
  13. define CACHE_CALIBRATOR_EXTRACT_LICENSE
  14. head -n 38 $(@D)/calibrator.c >$(@D)/calibrator.c.license
  15. endef
  16. CACHE_CALIBRATOR_PRE_PATCH_HOOKS += CACHE_CALIBRATOR_EXTRACT_LICENSE
  17. define CACHE_CALIBRATOR_BUILD_CMDS
  18. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(@D)/calibrator.c -o $(@D)/cache_calibrator -lm
  19. endef
  20. define CACHE_CALIBRATOR_INSTALL_TARGET_CMDS
  21. $(INSTALL) -D -m 0755 $(@D)/cache_calibrator $(TARGET_DIR)/usr/bin/cache_calibrator
  22. endef
  23. $(eval $(generic-package))