# Updates content of SD directory. # # SPDX-FileCopyrightText: 2021 Ivan Tatarinov # # SPDX-License-Identifier: GPL-3.0-or-later # # Supported environments: # * GNU on Linux, FreeBSD etc. # * GNU on Windows NT (using MinGW/MSYS/Cygwin/WSL) # # Build the project: # make [all] # Compile only: # make build | build- # Install: # make install | install- # Uninstall: # make uninstall | uninstall- # Clean: # make clean | clean- # make distclean | distclean- # # where: # is one of the values for `TARGETS' variable. include sdk/common.mk # Use uppercase for FAT filesystem prefix ?= SD exec_prefix ?= $(prefix) bindir ?= $(exec_prefix)/BIN TARGETS=\ utils\ software SOFTWARE_SUBDIRS=\ esprst\ iwconfig .PHONY: all all: $(foreach t,$(TARGETS),install-$(t)) @echo 'Done.' # utils .PHONY: build-utils build-utils: | utils $(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir)) .PHONY: install-utils install-utils: | utils $(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir)) install .PHONY: uninstall-utils uninstall-utils: | utils $(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir)) uninstall .PHONY: clean-utils clean-utils: | utils $(MAKE) -w -C $| clean .PHONY: distclean-utils distclean-utils: | utils $(MAKE) -w -C $| distclean # software .PHONY: build-software build-software: | software $(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir)) .PHONY: install-software install-software: | software for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) install; done .PHONY: uninstall-software uninstall-software: | software for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) uninstall; done .PHONY: clean-software clean-software: | software for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) clean; done .PHONY: distclean-software distclean-software: | software for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) distclean; done # all .PHONY: build build: $(foreach t,$(TARGETS),build-$(t)) .PHONY: install install: $(foreach t,$(TARGETS),install-$(t)) .PHONY: uninstall uninstall: $(foreach t,$(TARGETS),uninstall-$(t)) .PHONY: clean clean: $(foreach t,$(TARGETS),clean-$(t)) .PHONY: distclean distclean: $(foreach t,$(TARGETS),distclean-$(t))