2019-03-28 06:43:21 +00:00
|
|
|
PARALLELMFLAGS ?= -j$(shell nproc)
|
|
|
|
MAKEFLAGS += $(PARALLELMFLAGS) --no-builtin-rules
|
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
.PHONY: default
|
|
|
|
default: all
|
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
# Overridable defaults
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 02:48:15 +00:00
|
|
|
export SOURCE_DATE_EPOCH ?= $(shell $(PROJECT_ROOT)/build/get_source_date_epoch.sh)
|
|
|
|
export BUILDTIME ?= $(shell date -u -d '@$(SOURCE_DATE_EPOCH)' --rfc-3339 ns 2>/dev/null | sed -e 's/ /T/')
|
2019-03-28 06:43:21 +00:00
|
|
|
export DOCKER ?= docker
|
|
|
|
|
|
|
|
DOCKER_BUILDKIT ?=
|
2019-03-23 02:48:15 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
VERBOSE ?=
|
|
|
|
BUILDVERBOSE ?=
|
|
|
|
BUILDTARGET ?=
|
|
|
|
MARCH ?= $(call march,$(BUILDTARGET))
|
2019-03-23 02:48:15 +00:00
|
|
|
|
2019-03-26 22:04:53 +00:00
|
|
|
PROJECT_NAME ?= webfuse
|
2019-03-03 12:42:46 +00:00
|
|
|
PROJECT_ROOT ?= .
|
|
|
|
VERSION ?= $(shell cat $(PROJECT_ROOT)/VERSION)
|
2019-03-23 02:48:15 +00:00
|
|
|
OUT ?= $(PROJECT_ROOT)/.build
|
|
|
|
|
2019-03-20 00:32:55 +00:00
|
|
|
UID ?= $(shell id -u)
|
2019-03-23 02:48:15 +00:00
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
CONTAINER_USER ?= $(UID)
|
|
|
|
CONTAINER_GROUP ?= $(shell id -g)
|
2019-03-29 12:23:17 +00:00
|
|
|
CONTAINER_CGROUP_PARENT ?=
|
2019-03-28 06:43:21 +00:00
|
|
|
|
|
|
|
HOST_CONTAINER ?= $(shell $(PROJECT_ROOT)/build/get_container_id.sh)
|
|
|
|
HOST_CONTAINER := $(HOST_CONTAINER)
|
|
|
|
|
|
|
|
$(HOST_CONTAINER)PORTABLE_WORSPACE ?=
|
|
|
|
CONTAINER_PROJECT_ROOT ?= /workspace/src
|
|
|
|
CONTAINER_OUT ?= /workspace/out
|
|
|
|
$(PORTABLE_WORSPACE)CONTAINER_PROJECT_ROOT = $(abspath $(PROJECT_ROOT))
|
|
|
|
$(PORTABLE_WORSPACE)CONTAINER_OUT = $(abspath $(OUT))
|
2019-03-03 12:42:46 +00:00
|
|
|
|
|
|
|
UBUNTU_CODENAME ?= bionic
|
2019-03-20 23:43:53 +00:00
|
|
|
|
2019-03-23 03:07:47 +00:00
|
|
|
# Dependencies
|
2019-03-23 01:17:44 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
GTEST_VERSION ?= 1.8.1
|
2019-03-23 01:17:44 +00:00
|
|
|
DOCKER_BUILDARGS += GTEST_VERSION=$(GTEST_VERSION)
|
2019-03-23 03:07:47 +00:00
|
|
|
FETCH_TARGETS += $(OUT)/googletest-release-$(GTEST_VERSION).tar.gz
|
|
|
|
$(OUT)/googletest-release-$(GTEST_VERSION).tar.gz: URL := https://github.com/google/googletest/archive/release-$(GTEST_VERSION).tar.gz
|
2019-03-23 01:17:44 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
FUSE_VERSION ?= 3.1.1
|
2019-03-23 01:17:44 +00:00
|
|
|
DOCKER_BUILDARGS += FUSE_VERSION=$(FUSE_VERSION)
|
2019-03-23 03:07:47 +00:00
|
|
|
FETCH_TARGETS += $(OUT)/libfuse-fuse-$(FUSE_VERSION).tar.gz
|
|
|
|
$(OUT)/libfuse-fuse-$(FUSE_VERSION).tar.gz: URL := https://github.com/libfuse/libfuse/archive/fuse-$(FUSE_VERSION).tar.gz
|
2019-03-23 01:17:44 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
WEBSOCKETS_VERSION ?= 3.1.0
|
2019-03-23 01:17:44 +00:00
|
|
|
DOCKER_BUILDARGS += WEBSOCKETS_VERSION=$(WEBSOCKETS_VERSION)
|
2019-03-23 03:07:47 +00:00
|
|
|
FETCH_TARGETS += $(OUT)/libwebsockets-$(WEBSOCKETS_VERSION).tar.gz
|
|
|
|
$(OUT)/libwebsockets-$(WEBSOCKETS_VERSION).tar.gz: URL := https://github.com/warmcat/libwebsockets/archive/v$(WEBSOCKETS_VERSION).tar.gz
|
2019-03-23 01:17:44 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
JANSSON_VERSION ?= 2.12
|
2019-03-23 01:17:44 +00:00
|
|
|
DOCKER_BUILDARGS += JANSSON_VERSION=$(JANSSON_VERSION)
|
2019-03-23 03:07:47 +00:00
|
|
|
FETCH_TARGETS += $(OUT)/jansson-$(JANSSON_VERSION).tar.gz
|
|
|
|
$(OUT)/jansson-$(JANSSON_VERSION).tar.gz: URL := https://github.com/akheron/jansson/archive/v$(JANSSON_VERSION).tar.gz
|
2019-03-20 23:43:53 +00:00
|
|
|
|
2019-03-23 03:07:47 +00:00
|
|
|
QEMU_VERSION ?= v3.1.0-2
|
|
|
|
FETCH_TARGETS += $(OUT)/docker/qemu-arm-static-$(QEMU_VERSION)
|
|
|
|
$(OUT)/docker/qemu-arm-static-$(QEMU_VERSION): URL := https://github.com/multiarch/qemu-user-static/releases/download/$(QEMU_VERSION)/qemu-arm-static
|
|
|
|
|
|
|
|
# Architecture-specific rule target configuration
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
march = $(shell echo '$1' | sed -n -e 's@\([^-]*\)-.*@\1@p')
|
|
|
|
|
|
|
|
TARGETS += $(BUILDTARGET)
|
|
|
|
MARCH := $(MARCH)
|
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
MARCH_AMD64 := $(filter-out amd64,$(MARCH))
|
2019-03-23 01:17:44 +00:00
|
|
|
$(MARCH_AMD64)MARCHS += amd64
|
|
|
|
$(MARCH_AMD64)TARGETS += amd64-ubuntu-builder
|
2019-03-23 15:45:28 +00:00
|
|
|
$(OUT)/amd64-ubuntu-builder/rules.mk: TARGET := amd64-ubuntu-builder
|
2019-03-23 01:17:44 +00:00
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
MARCH_ARM32V7 := $(filter-out arm32v7,$(MARCH))
|
2019-03-23 01:17:44 +00:00
|
|
|
$(MARCH_ARM32V7)MARCHS += arm32v7
|
|
|
|
$(MARCH_ARM32V7)TARGETS += arm32v7-ubuntu-builder
|
2019-03-23 15:45:28 +00:00
|
|
|
$(OUT)/arm32v7-ubuntu-builder/rules.mk: TARGET := arm32v7-ubuntu-builder
|
2019-03-23 01:17:44 +00:00
|
|
|
|
2019-03-23 17:16:31 +00:00
|
|
|
$(MARCH_AMD64)MEMCHECK_TARGETS += $(addprefix memcheck-,$(TARGETS))
|
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
ARM_TARGETS = $(filter arm%,$(TARGETS))
|
2019-03-23 03:07:47 +00:00
|
|
|
$(addprefix $(OUT)/docker/,$(ARM_TARGETS)): $(OUT)/docker/qemu-arm-static-$(QEMU_VERSION)
|
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
UBUNTU_TARGETS = $(filter $(addsuffix -ubuntu%,$(MARCHS)),$(TARGETS))
|
2019-03-23 03:07:47 +00:00
|
|
|
$(addprefix $(OUT)/docker/,$(UBUNTU_TARGETS)): CODENAME := $(UBUNTU_CODENAME)
|
|
|
|
|
|
|
|
# Common rule target configuration
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
CMAKEFLAGS += '-GNinja'
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
BUILDSILENT := $(if $(BUILDVERBOSE),,1)
|
|
|
|
$(BUILDSILENT)NINJAFLAGS += -v
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-29 12:23:17 +00:00
|
|
|
DOCKER_RUNFLAGS += --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined
|
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
DOCKER_RUNFLAGS += --interactive
|
|
|
|
DOCKER_RUNFLAGS += --rm
|
2019-03-20 00:32:55 +00:00
|
|
|
DOCKER_RUNFLAGS += --init
|
2019-03-23 01:17:44 +00:00
|
|
|
DOCKER_RUNFLAGS += --user $(CONTAINER_USER):$(CONTAINER_GROUP)
|
2019-03-03 12:42:46 +00:00
|
|
|
DOCKER_RUNFLAGS += --env SOURCE_DATE_EPOCH
|
2019-03-23 02:48:15 +00:00
|
|
|
DOCKER_RUNFLAGS += --env BUILDTIME
|
2019-03-28 06:43:21 +00:00
|
|
|
DOCKER_RUNFLAGS += --env NINJA_STATUS
|
|
|
|
DOCKER_RUNFLAGS += $(addprefix --volumes-from ,$(HOST_CONTAINER))
|
2019-03-29 12:23:17 +00:00
|
|
|
DOCKER_RUNFLAGS += $(addprefix --cgroup-parent ,$(CONTAINER_CGROUP_PARENT))
|
2019-03-03 12:42:46 +00:00
|
|
|
|
|
|
|
DOCKER_BUILDARGS += CODENAME=$(CODENAME)
|
2019-03-20 23:43:53 +00:00
|
|
|
DOCKER_BUILDARGS += PARALLELMFLAGS=$(PARALLELMFLAGS)
|
2019-03-20 00:32:55 +00:00
|
|
|
DOCKER_BUILDARGS += USERID=$(UID)
|
2019-03-28 06:43:21 +00:00
|
|
|
DOCKER_BUILDARGS += PROJECT_ROOT=$(CONTAINER_PROJECT_ROOT)
|
|
|
|
DOCKER_BUILDARGS += OUT=$(CONTAINER_OUT)
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 01:17:44 +00:00
|
|
|
DOCKER_BUILDFLAGS += --rm
|
2019-03-03 12:42:46 +00:00
|
|
|
DOCKER_BUILDFLAGS += $(addprefix --build-arg ,$(DOCKER_BUILDARGS))
|
|
|
|
|
|
|
|
OUT_DIRS += $(OUT)
|
|
|
|
OUT_DIRS += $(OUT)/docker
|
2019-03-20 23:43:53 +00:00
|
|
|
OUT_DIRS += $(OUT)/src
|
2019-03-03 12:42:46 +00:00
|
|
|
OUT_DIRS += $(addprefix $(OUT)/,$(TARGETS))
|
|
|
|
|
2019-03-23 15:45:28 +00:00
|
|
|
BUILD_TARGETS += $(addprefix build-,$(TARGETS))
|
2019-03-03 12:42:46 +00:00
|
|
|
CHECK_TARGETS += $(addprefix check-,$(TARGETS))
|
2019-03-28 06:43:21 +00:00
|
|
|
CLEAN_TARGETS += $(addprefix clean-,$(TARGETS))
|
|
|
|
RUN_TARGETS += $(addprefix run-,$(firstword $(TARGETS)))
|
2019-03-20 23:43:53 +00:00
|
|
|
EXTRACT_TARGETS += $(patsubst $(OUT)/%.tar.gz,$(OUT)/src/%,$(FETCH_TARGETS))
|
2019-03-28 06:43:21 +00:00
|
|
|
DISCOVER_CC_TARGETS += $(addprefix discover-cc-,$(firstword $(TARGETS)))
|
2019-03-23 15:45:28 +00:00
|
|
|
RULE_TARGETS = $(addprefix $(OUT)/,$(addsuffix /rules.mk,$(TARGETS)))
|
2019-03-23 01:17:44 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
TARGETS := $(sort $(TARGETS))
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 15:45:28 +00:00
|
|
|
# Macros
|
|
|
|
|
|
|
|
echo_if_silent = VERBOSE=1
|
|
|
|
$(VERBOSE)echo_if_silent = echo $1
|
|
|
|
$(VERBOSE)SILENT := @
|
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
$(HOST_CONTAINER)container_run_volumes += '$(realpath $(PROJECT_ROOT)):$(CONTAINER_PROJECT_ROOT):cached'
|
|
|
|
$(HOST_CONTAINER)container_run_volumes += '$(realpath $(OUT)/$1):$(CONTAINER_OUT)/$1:delegated'
|
|
|
|
|
2019-03-29 12:23:17 +00:00
|
|
|
container_name = $(REGISTRY_PREFIX)$(subst -,/,$1)/$(PROJECT_NAME):$(VERSION)
|
2019-03-28 06:43:21 +00:00
|
|
|
container_run = $(DOCKER) run $(DOCKER_RUNFLAGS) $3 \
|
|
|
|
$(addprefix --volume ,$(call container_run_volumes,$1)) \
|
|
|
|
--workdir '$(CONTAINER_OUT)/$1' \
|
2019-03-29 12:23:17 +00:00
|
|
|
$(call container_name,$1) \
|
2019-03-28 06:43:21 +00:00
|
|
|
$2
|
|
|
|
|
|
|
|
image_rule = \
|
|
|
|
$$(OUT)/docker/$1: $$(OUT)/docker/$1.dockerfile $$(EXTRACT_TARGETS) $$(PROJECT_ROOT)/Makefile; \
|
2019-03-29 12:23:17 +00:00
|
|
|
$(SILENT)$$(call image,$1)
|
|
|
|
image = \
|
|
|
|
$(call echo_if_silent,docker build $(call container_name,$1) $(OUT)) \
|
|
|
|
&& $(DOCKER) build $(DOCKER_BUILDFLAGS) --iidfile $@ --file $< --tag $(call container_name,$1) $(OUT)
|
2019-03-28 06:43:21 +00:00
|
|
|
|
|
|
|
configure_rule = \
|
|
|
|
$$(OUT)/$1/CMakeCache.txt: $$(PROJECT_ROOT)/CMakeLists.txt $$(OUT)/docker/$1; \
|
2019-03-29 12:23:17 +00:00
|
|
|
$(SILENT)$$(call configure,$1)
|
|
|
|
configure = \
|
2019-03-28 06:43:21 +00:00
|
|
|
$(call run,$1,sh -c 'cmake $(CMAKEFLAGS) $(CONTAINER_PROJECT_ROOT) && $(CONTAINER_PROJECT_ROOT)/build/discover_cc_settings.sh $(notdir $@) $(realpath $(dir $@))') \
|
2019-03-29 12:23:17 +00:00
|
|
|
&& touch $(addprefix $(dir $@)/,include_dirs.txt) $@
|
2019-03-28 06:43:21 +00:00
|
|
|
|
|
|
|
build_rule = \
|
|
|
|
build-$1: $$(OUT)/$1/CMakeCache.txt; \
|
2019-03-29 12:23:17 +00:00
|
|
|
$(SILENT)$$(call build,$1)
|
|
|
|
build = $(call run,$1,ninja $(PARALLELMFLAGS) $(NINJAFLAGS) $(GOALS))
|
2019-03-28 06:43:21 +00:00
|
|
|
|
|
|
|
check_rule = \
|
|
|
|
check-$1: build-$1;
|
|
|
|
|
|
|
|
memcheck_rule = \
|
|
|
|
memcheck-$1: build-$1; \
|
2019-03-29 12:23:17 +00:00
|
|
|
$(SILENT)$$(call memcheck,$1)
|
|
|
|
memcheck = $(call run,$1,ctest -T memcheck $(CTESTFLAGS))
|
|
|
|
|
|
|
|
run_rule = \
|
|
|
|
run-$1: $$(OUT)/docker/$1; \
|
|
|
|
$(SILENT)$$(call run,$1,/bin/bash,--tty) || true
|
|
|
|
run = $(call echo_if_silent,TARGET=$1 $2) && $(call container_run,$1,$2,$3)
|
|
|
|
|
|
|
|
clean_rule = \
|
|
|
|
clean-$1: ; \
|
|
|
|
$(SILENT)-$$(call clean,$1)
|
|
|
|
clean = rm -rf $(OUT)/$1
|
2019-03-28 06:43:21 +00:00
|
|
|
|
|
|
|
discover_cc_settings_rule = \
|
|
|
|
$$(OUT)/$1/include_dirs.txt: $$(OUT)/$1/CMakeCache.txt; \
|
2019-03-29 12:23:17 +00:00
|
|
|
$(SILENT)$$(call discover_cc_settings,$1)
|
|
|
|
discover_cc_settings = \
|
2019-03-28 06:43:21 +00:00
|
|
|
$(call run,$1,$(CONTAINER_PROJECT_ROOT)/build/discover_cc_settings.sh $(notdir $<) $(realpath $(dir $<)))
|
|
|
|
|
|
|
|
discover_cc_rule = \
|
|
|
|
discover-cc-$1: $$(OUT)/$1/include_dirs.txt; \
|
2019-03-29 12:23:17 +00:00
|
|
|
$(SILENT)$$(call discover_cc,$1)
|
|
|
|
discover_cc = cat $<
|
2019-03-23 15:45:28 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
# Rules
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
ifneq ($(MAKECMDGOALS),distclean)
|
2019-03-23 15:45:28 +00:00
|
|
|
-include $(RULE_TARGETS)
|
2019-03-23 16:18:33 +00:00
|
|
|
endif
|
2019-03-23 01:38:52 +00:00
|
|
|
|
2019-03-23 15:45:28 +00:00
|
|
|
$(RULE_TARGETS): $(PROJECT_ROOT)/Makefile | $(OUT_DIRS)
|
2019-03-23 16:18:33 +00:00
|
|
|
$(SILENT) \
|
2019-03-23 15:45:28 +00:00
|
|
|
{ \
|
|
|
|
echo; \
|
|
|
|
echo '$(call image_rule,$(TARGET))'; \
|
|
|
|
echo; \
|
|
|
|
echo '$(call configure_rule,$(TARGET))'; \
|
|
|
|
echo; \
|
|
|
|
echo '$(call build_rule,$(TARGET))'; \
|
|
|
|
echo; \
|
|
|
|
echo '$(call check_rule,$(TARGET))'; \
|
2019-03-23 16:18:33 +00:00
|
|
|
echo; \
|
2019-03-23 17:16:31 +00:00
|
|
|
echo '$(call memcheck_rule,$(TARGET))'; \
|
|
|
|
echo; \
|
2019-03-23 16:18:33 +00:00
|
|
|
echo '$(call run_rule,$(TARGET))'; \
|
2019-03-28 06:43:21 +00:00
|
|
|
echo; \
|
2019-03-29 12:23:17 +00:00
|
|
|
echo '$(call clean_rule,$(TARGET))'; \
|
|
|
|
echo; \
|
2019-03-28 06:43:21 +00:00
|
|
|
echo '$(call discover_cc_settings_rule,$(TARGET))'; \
|
|
|
|
echo; \
|
|
|
|
echo '$(call discover_cc_rule,$(TARGET))'; \
|
2019-03-23 15:45:28 +00:00
|
|
|
} > $@
|
2019-03-23 01:38:52 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
.PHONY: all build-%
|
|
|
|
all: $(BUILD_TARGETS);
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
.PHONY: check check-%
|
|
|
|
check: $(CHECK_TARGETS);
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
.PHONY: memcheck memcheck-%
|
|
|
|
memcheck: $(MEMCHECK_TARGETS);
|
2019-03-23 17:16:31 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
.PHONY: lint lint-%
|
|
|
|
lint: $(LINT_TARGETS);
|
|
|
|
|
|
|
|
.PHONY: run run-%
|
|
|
|
run: $(RUN_TARGETS);
|
|
|
|
|
|
|
|
.PHONY: clean clean-%
|
|
|
|
clean: $(CLEAN_TARGETS);
|
|
|
|
|
|
|
|
.PHONY: get-deps get-deps-%
|
|
|
|
get-deps: $(EXTRACT_TARGETS);
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
.PHONY: discover-cc discover-cc-%
|
|
|
|
discover-cc: $(DISCOVER_CC_TARGETS);
|
|
|
|
|
|
|
|
.PHONY: distclean
|
|
|
|
distclean:
|
|
|
|
$(SILENT)-rm -rf $(OUT_DIRS)
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
.PHONY: debug-print-%
|
|
|
|
debug-print-%:
|
|
|
|
@printf '%s\n' '$*:' $($*)
|
2019-03-19 23:58:06 +00:00
|
|
|
|
2019-03-28 06:43:21 +00:00
|
|
|
$(CHECK_TARGETS): GOALS := test
|
2019-03-23 17:16:31 +00:00
|
|
|
$(CHECK_TARGETS) $(MEMCHECK_TARGETS): CONTAINER_USER := user
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-20 23:43:53 +00:00
|
|
|
$(OUT)/docker/qemu-arm-static-$(QEMU_VERSION):
|
|
|
|
$(SILENT) \
|
2019-03-23 01:17:44 +00:00
|
|
|
$(call echo_if_silent,curl -fsSL -o $@ $(URL)) \
|
|
|
|
&& curl -fsSL -o $@ $(URL) \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& chmod +x $@
|
2019-03-03 12:42:46 +00:00
|
|
|
|
2019-03-23 02:48:15 +00:00
|
|
|
$(OUT)/docker/% : $(PROJECT_ROOT)/build/% | $(OUT_DIRS)
|
2019-03-20 23:43:53 +00:00
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(OUT)/%.tar.gz: | $(OUT_DIRS)
|
|
|
|
curl -fsSL -o $@ $(URL)
|
|
|
|
|
|
|
|
$(OUT)/src/%: $(OUT)/%.tar.gz | $(OUT_DIRS)
|
|
|
|
$(SILENT) \
|
2019-03-23 01:17:44 +00:00
|
|
|
$(call echo_if_silent,tar -C $(dir $@) -xf $<) \
|
|
|
|
&& tar -C $(dir $@) -xf $< \
|
2019-03-20 23:43:53 +00:00
|
|
|
&& touch $@
|
|
|
|
|
2019-03-03 12:42:46 +00:00
|
|
|
$(OUT_DIRS):
|
|
|
|
$(SILENT)mkdir -p $@
|
|
|
|
|