mirror of
https://gitlab.com/mecatronyx/opencnc/experiments/opencn-rootfs.git
synced 2026-08-17 16:44:25 +08:00
24 lines
425 B
Makefile
24 lines
425 B
Makefile
|
|
lastword = $(word $(words $(1)),$(1))
|
|
makedir := $(dir $(call lastword,$(MAKEFILE_LIST)))
|
|
|
|
MAKEARGS := -C ../buildroot BR2_EXTERNAL_DIRS="../rootfs"
|
|
MAKEARGS += O=$(if $(patsubst /%,,$(makedir)),$(CURDIR)/)$(patsubst %/,%,$(makedir))
|
|
|
|
MAKEFLAGS += --no-print-directory
|
|
|
|
.PHONY: all $(MAKECMDGOALS)
|
|
|
|
all := $(filter-out Makefile,$(MAKECMDGOALS))
|
|
|
|
_all:
|
|
$(MAKE) $(MAKEARGS) $(all)
|
|
|
|
Makefile:;
|
|
|
|
$(all): _all
|
|
@:
|
|
|
|
%/: _all
|
|
@:
|