Skip to content
Snippets Groups Projects
bosp.mk 1.47 KiB
Newer Older
  • Learn to ignore specific revisions
  • Radim Vavřík's avatar
    Radim Vavřík committed
    
    ifdef CONFIG_CONTRIB_MPIUNCERTAINTY
    
    # Targets provided by this project
    .PHONY: mpiuncertainty clean_mpiuncertainty
    
    # Add this to the "contrib_testing" target
    testing: mpiuncertainty
    clean_testing: clean_mpiuncertainty
    
    MODULE_CONTRIB_USER_MPIUNCERTAINTY=contrib/user/MpiUncertainty
    
    mpiuncertainty: external
    	@echo
    	@echo "==== Building MpiUncertainty ($(BUILD_TYPE)) ===="
    	@echo " Using GCC    : $(CC)"
    	@echo " Target flags : $(TARGET_FLAGS)"
    	@echo " Sysroot      : $(PLATFORM_SYSROOT)"
    	@echo " BOSP Options : $(CMAKE_COMMON_OPTIONS)"
    	@[ -d $(MODULE_CONTRIB_USER_MPIUNCERTAINTY)/build/$(BUILD_TYPE) ] || \
    		mkdir -p $(MODULE_CONTRIB_USER_MPIUNCERTAINTY)/build/$(BUILD_TYPE) || \
    		exit 1
    	@cd $(MODULE_CONTRIB_USER_MPIUNCERTAINTY)/build/$(BUILD_TYPE) && \
    		CC=$(CC) CFLAGS=$(TARGET_FLAGS) \
    		CXX=$(CXX) CXXFLAGS=$(TARGET_FLAGS) \
    		cmake $(CMAKE_COMMON_OPTIONS) ../.. || \
    		exit 1
    	@cd $(MODULE_CONTRIB_USER_MPIUNCERTAINTY)/build/$(BUILD_TYPE) && \
    		make -j$(CPUS) install || \
    		exit 1
    
    clean_mpiuncertainty:
    	@echo
    	@echo "==== Clean-up MpiUncertainty Application ===="
    	@[ ! -f $(BUILD_DIR)/usr/bin/mpiuncertainty ] || \
    		rm -f $(BUILD_DIR)/etc/bbque/recipes/MpiUncertainty*; \
    		rm -f $(BUILD_DIR)/usr/bin/mpiuncertainty*
    	@rm -rf $(MODULE_CONTRIB_USER_MPIUNCERTAINTY)/build
    	@echo
    
    else # CONFIG_CONTRIB_MPIUNCERTAINTY
    
    mpiuncertainty:
    	$(warning contib module MpiUncertainty disabled by BOSP configuration)
    	$(error BOSP compilation failed)
    
    endif # CONFIG_CONTRIB_MPIUNCERTAINTY