File: Makefile

package info (click to toggle)
gprbuild 2025.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,752 kB
  • sloc: ada: 72,651; sh: 429; makefile: 422; python: 242; ansic: 108; cpp: 89; fortran: 62; xml: 13
file content (20 lines) | stat: -rw-r--r-- 703 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
%:
	@echo 'Unknown target. Usage:'
	@echo 'make [all]                   build all examples'
	@echo 'make run                     run all examples'
	@echo 'make clean                   clean all examples'
	@echo 'make GPRBUILDFLAGS=-v        add options for gprbuild'
	@echo 'make ada_cpp/all matrix/all  build two specific examples'

subdirectories := $(wildcard */)
targets_all   := $(subdirectories:=all)
targets_clean := $(subdirectories:=clean)
targets_run   := $(subdirectories:=run)

all  : $(targets_all)
clean: $(targets_clean)
run  : $(targets_run)
$(targets_all) $(targets_clean) $(targets_run):
	$(MAKE) -C$(subst /, ,$@)

.PHONY: all clean run $(targets_all) $(targets_clean) $(targets_run)