forked from ps2dev/ps2sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
90 lines (69 loc) · 2.16 KB
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# _____ ___ ____ ___ ____
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ 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.
ifeq (x$(PS2SDKSRC), x)
export PS2SDKSRC=$(shell pwd)
endif
SUBDIRS = tools iop ee common samples
all: build
@$(ECHO) .;
@$(ECHO) .PS2SDK Built.;
@$(ECHO) .;
# 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)
$(subdir_list): dummy
$(MAKEREC) $(patsubst all-%,%,$@)
$(subdir_clean): dummy
$(MAKEREC) $(patsubst clean-%,%,$@) clean
$(subdir_release): dummy
$(MAKEREC) $(patsubst release-%,%,$@) release
build: env_build_check $(subdir_list)
clean: env_build_check $(subdir_clean)
release-clean:
make -C common release-clean
make -C iop release-iop-clean
make -C ee release-ee-clean
make -C samples release-clean
make -C tools release-clean
rebuild: env_build_check $(subdir_clean) $(subdir_list)
$(PS2SDK)/common/include:
$(MKDIR) -p $(PS2SDK)/common
$(MKDIR) -p $(PS2SDK)/common/include
cp -f $(PS2SDKSRC)/common/include/*.h $(PS2SDK)/common/include/
$(PS2SDK)/ports:
$(MKDIR) -p $(PS2SDK)/ports
install: release
release: build release_base release-clean $(PS2SDK)/common/include $(PS2SDK)/ports $(subdir_release)
release_base: env_release_check
@if test ! -d $(PS2SDK) ; then \
$(MKDIR) -p $(PS2SDK) ; \
fi
cp -f README.md $(PS2SDK)
cp -f CHANGELOG $(PS2SDK)
cp -f AUTHORS $(PS2SDK)
cp -f LICENSE $(PS2SDK)
cp -f ID $(PS2SDK)
cp -f Defs.make $(PS2SDK)
env_build_check:
@if test -z $(PS2SDKSRC) ; \
then \
$(ECHO) PS2SDKSRC environment variable should be defined. ; \
fi
env_release_check:
@if test -z $(PS2SDK) ; \
then \
$(ECHO) PS2SDK environment variable must be defined. ; \
exit 1; \
fi
docs:
doxygen doxy.conf
include Defs.make