-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
115 lines (101 loc) · 3.27 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
-include .config
help:
@echo ""
@echo "make help - this text"
@echo "make menuconfig - open menu configuration"
@echo "make all - build everything"
@echo "make dist - install everything to dist path"
@echo "make install - install everything to install path"
@echo ""
@echo "make doxy-doc - build doxygen documentation"
@echo ""
@echo "make clean - clean everything"
@echo "make distclean - clean much more"
@echo ""
@echo "make linux - linux default configuration"
@echo "make linux-single - linux single app configuration"
@echo "make mingw - mingw default configuration"
@echo "make pspdev - pspdev default configuration"
@echo "make gp2x - gp2x default configuration"
@echo ""
check_goal := $(filter-out menuconfig, $(MAKECMDGOALS))
check_goal := $(filter-out doxy-doc, $(checkgoal))
check_goal := $(filter-out distclean, $(check_goal))
check_goal := $(filter-out clean, $(check_goal))
check_goal := $(filter-out linux, $(check_goal))
check_goal := $(filter-out linux-single, $(check_goal))
check_goal := $(filter-out mingw, $(check_goal))
check_goal := $(filter-out pspdev, $(check_goal))
check_goal := $(filter-out gp2x, $(check_goal))
check_goal := $(strip $(check_goal))
ifneq ($(check_goal),)
ifneq "$(CONFIG_CONFIGURED)" "y"
$(error You must first run make menuconfig)
endif
endif
subdir-y := tools/config
subdir-y += src
subdir-n := tools/theme
subdir-n += tools/optimize
include Makefile.lib
.PHONY: linux linux-single mingw pspdev gp2x
linux linux-single mingw pspdev gp2x: tools/config_all
$(CP) configs/[email protected] .config
tools/config/conf -s configs/Config
if [ -e "src/configs/[email protected]" ]; then $(CP) src/configs/[email protected] src/configs/xynth.conf; fi
.PHONY: menuconfig
menuconfig: tools/config_all
tools/config/mconf configs/Config
tools/config/conf -s configs/Config
.PHONY: distclean
distclean: clean
@$(RM) .config .config.cmd .config.old .kconfig.d .tmpconfig.h .tmpconfig src/lib/config.h dist doc
.PHONY: distdirs
distdirs: __FORCE
$(RM) dist
$(MKDIR) dist
$(MKDIR) dist/$(CONFIG_PATH_BIN)
$(MKDIR) dist/$(CONFIG_PATH_LIB)
$(MKDIR) dist/$(CONFIG_PATH_LIB)/pkgconfig
$(MKDIR) dist/$(CONFIG_PATH_INCLUDE)
$(MKDIR) dist/$(CONFIG_PATH_SHARE)
$(MKDIR) dist/$(CONFIG_PATH_FONTS)
$(MKDIR) dist/$(CONFIG_PATH_CONFIGS)
$(MKDIR) dist/$(CONFIG_PATH_THEMES)
.PHONY: xynth.pc
xynth.pc: xynth.pc.in
$(SED) -e 's,@prefix@,$(CONFIG_PATH_INSTALL)/,g' \
-e 's,@version@,0.10.82,g' \
-e 's,@widget_libs@,-lwidget,g' \
xynth.pc.in > dist/$(CONFIG_PATH_LIB)/pkgconfig/xynth.pc
.PHONY: dist
dist: distdirs xynth.pc
@true
.PHONY: install
install: dist
ifeq ($(CONFIG_PLATFORM_PSPDEV), y)
$(CP) dist/bin/EBOOT.PBP dist/EBOOT.PBP
$(RM) dist/$(CONFIG_PATH_BIN)
$(RM) dist/$(CONFIG_PATH_LIB)
$(RM) dist/$(CONFIG_PATH_INCLUDE)
else
$(CP) ./dist/* $(CONFIG_PATH_INSTALL)/
endif
.PHONY: doxy-doc
doxy-doc:
SRCDIR='.' \
PROJECT='xynth' \
DOCDIR='doc' \
VERSION='0.10.82' \
PERL_PATH='/usr/bin/perl' \
HAVE_DOT='NO' \
GENERATE_MAN='NO' \
GENERATE_RTF='NO' \
GENERATE_XML='NO' \
GENERATE_HTMLHELP='NO' \
GENERATE_CHI='NO' \
GENERATE_HTML='YES' \
GENERATE_LATEX='YES' \
EXCLUDE_PATTERNS='dist ports tools demo expat freetype2 libpng libz pixman pthread_w32' \
/usr/bin/doxygen \
./doxygen.cfg