Skip to content
Snippets Groups Projects
Commit 08e66e3c authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

added Makefile for INAU

parent 25df80b8
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
# Makefile
# Get the current working directory
CURRENT_DIR := $(shell pwd)
# Set default values for build_dir and install_prefix
BUILD_DIR := $(CURRENT_DIR)/build
TMP_INSTALL_DIR=$(CURRENT_DIR)/tmp-install-dir
PREFIX ?= /runtime
export MAKE := $(MAKE)
# The default target when you run 'make'
all:
@echo "[ Makefile ] build_dir=$(BUILD_DIR) install_prefix=$(PREFIX) jobs $(JOBS)"
@export build_dir=$(BUILD_DIR); \
export install_prefix=$(PREFIX); \
mkdir -p $(BUILD_DIR); \
cd $(BUILD_DIR) && cmake .. -DCMAKE_INSTALL_PREFIX=$(TMP_INSTALL_DIR) && $(MAKE) && $(MAKE) install
# The target when you run 'make install'
install:
@echo "[ Makefile ] installing from $(TMP_INSTALL_DIR) to $(PREFIX)"
@mkdir -p $(PREFIX)
@cp -rv $(TMP_INSTALL_DIR)/* $(PREFIX)
# Set the build_dir and install_prefix from the command line if provided
# Example: make build_dir=/custom/build install_prefix=/custom/install install
build:
@echo "[ Makefile ] build_dir=$(BUILD_DIR) and install_prefix=$(PREFIX)"
@export build_dir=$(BUILD_DIR); \
export install_prefix=$(PREFIX); \
mkdir -p $(BUILD_DIR); \
cd $(BUILD_DIR) && cmake .. -DCMAKE_INSTALL_PREFIX=$(TMP_INSTALL_DIR) && $(MAKE) && $(MAKE) install
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment