framework.mk 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ifeq ($(_THEOS_RULES_LOADED),)
  2. include $(THEOS_MAKE_PATH)/rules.mk
  3. endif
  4. .PHONY: internal-framework-all_ internal-framework-stage_ internal-framework-compile
  5. # Bundle Setup
  6. LOCAL_INSTALL_PATH ?= $(or $(strip $($(THEOS_CURRENT_INSTANCE)_INSTALL_PATH)),/Library/Frameworks)
  7. LOCAL_BUNDLE_NAME = $(or $($(THEOS_CURRENT_INSTANCE)_BUNDLE_NAME),$($(THEOS_CURRENT_INSTANCE)_FRAMEWORK_NAME),$(THEOS_CURRENT_INSTANCE))
  8. _LOCAL_BUNDLE_FULL_NAME = $(LOCAL_BUNDLE_NAME).framework
  9. _THEOS_SHARED_BUNDLE_BUILD_PATH = $(THEOS_OBJ_DIR)/$(_LOCAL_BUNDLE_FULL_NAME)
  10. _THEOS_SHARED_BUNDLE_STAGE_PATH = $(THEOS_STAGING_DIR)$(LOCAL_INSTALL_PATH)/$(_LOCAL_BUNDLE_FULL_NAME)
  11. _LOCAL_INSTANCE_TARGET := $(_LOCAL_BUNDLE_FULL_NAME)$(_THEOS_TARGET_BUNDLE_BINARY_SUBDIRECTORY)/$(THEOS_CURRENT_INSTANCE)
  12. include $(THEOS_MAKE_PATH)/instance/shared/bundle.mk
  13. # End Bundle Setup
  14. _THEOS_INTERNAL_LDFLAGS += -dynamiclib -install_name "$(LOCAL_INSTALL_PATH)/$(_LOCAL_INSTANCE_TARGET)"
  15. ifeq ($(_THEOS_MAKE_PARALLEL_BUILDING), no)
  16. internal-framework-all_:: $(_OBJ_DIR_STAMPS) shared-instance-bundle-all $(THEOS_OBJ_DIR)/$(_LOCAL_INSTANCE_TARGET)
  17. else
  18. internal-framework-all_:: $(_OBJ_DIR_STAMPS) shared-instance-bundle-all
  19. $(ECHO_NOTHING)$(MAKE) -f $(_THEOS_PROJECT_MAKEFILE_NAME) --no-print-directory --no-keep-going \
  20. internal-framework-compile \
  21. _THEOS_CURRENT_TYPE=$(_THEOS_CURRENT_TYPE) THEOS_CURRENT_INSTANCE=$(THEOS_CURRENT_INSTANCE) _THEOS_CURRENT_OPERATION=compile \
  22. THEOS_BUILD_DIR="$(THEOS_BUILD_DIR)" _THEOS_MAKE_PARALLEL=yes$(ECHO_END)
  23. internal-framework-compile: $(THEOS_OBJ_DIR)/$(_LOCAL_INSTANCE_TARGET)
  24. endif
  25. $(eval $(call _THEOS_TEMPLATE_DEFAULT_LINKING_RULE,$(_LOCAL_INSTANCE_TARGET)))
  26. internal-framework-stage_:: shared-instance-bundle-stage
  27. $(eval $(call __mod,instance/framework.mk))