-
Notifications
You must be signed in to change notification settings - Fork 133
/
Rules.make
42 lines (33 loc) · 1.24 KB
/
Rules.make
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# _____ ___ ____ ___ ____
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
# Common rules shared by all build targets.
.PHONY: dummy
# Use SUBDIRS to descend into subdirectories.
subdir_list = $(patsubst %,all-%,$(SUBDIRS))
subdir_clean = $(patsubst %,clean-%,$(SUBDIRS))
subdir_release = $(patsubst %,release-%,$(SUBDIRS))
subdirs: dummy $(subdir_list)
ifdef SUBDIRS
$(subdir_list): dummy
$(MAKE) -C $(patsubst all-%,%,$@)
$(subdir_clean): dummy
$(MAKE) -C $(patsubst clean-%,%,$@) clean
$(subdir_release): dummy
$(MAKE) -C $(patsubst release-%,%,$@) release
# Directory-level parallelism has been disabled due to issues with
# multiple Make instances running inside a directory at once
# and causing output file corruption
.NOTPARALLEL:: $(subdir_list) $(subdir_clean) $(subdir_release)
endif
all: $(subdir_list)
# Default rule for clean.
clean: $(subdir_clean)
#Default rule for release
release: $(subdir_release)
# A rule to do nothing.
dummy: