forked from pelrun/CHDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile_base.inc
136 lines (115 loc) · 3.13 KB
/
makefile_base.inc
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Base makefile rules
# Define default target (place this first so it is always selected if no target on command line)
.PHONY: default
default: all
MEMISOSIZE="(&_end-&_start)"
# override this on the command line or in buildconf to use PRIMARY.BIN from a different tree
# should be an absolute path
PRIMARY_ROOT=$(topdir)platform
include $(topdir)buildconf.inc
# optional local version of buildconf.inc, not in SVN so it can be used in autobuilds
# and to avoid getting accidentally included in svn diffs
# you may also set your default camera here
-include $(topdir)localbuildconf.inc
include $(topdir)version.inc
-include $(topdir)revision.inc
ifndef OPT_DE_VERSION
VER=CHDK
ifndef OPT_DEFAULT_LANG
OPT_DEFAULT_LANG=english
endif
else
VER=CHDK_DE
ifndef OPT_DEFAULT_LANG
OPT_DEFAULT_LANG=german
endif
endif
# Define some shorthand file & directory locations
bin=$(topdir)bin
chdk=$(topdir)CHDK
core=$(topdir)core
doc=$(topdir)doc
include=$(topdir)include
loader=$(topdir)loader/$(PLATFORM)
lib=$(topdir)lib
larmutil=$(lib)/armutil
lcore=$(lib)/core
lfont=$(lib)/font
llang=$(lib)/lang
llibc=$(lib)/libc
llua=$(lib)/lua
lmath=$(lib)/math
lubasic=$(lib)/ubasic
modules=$(topdir)modules
platform=$(topdir)platform
tools=$(topdir)tools
cam=$(platform)/$(PLATFORM)
camfw=$(cam)/sub/$(PLATFORMSUB)
TARGET_PRIMARY=$(PRIMARY_ROOT)/$(PLATFORM)/sub/$(PLATFORMSUB)/PRIMARY.BIN
PAKWIF=$(tools)/pakwif$(EXE)
PAKFI2=$(tools)/packfi2/fi2enc$(EXE)
ENCODE_DISKBOOT=$(tools)/dancingbits$(EXE)
# Load camera settings (optional)
ifdef PLATFORM
-include $(cam)/makefile.inc
endif
# Sub-directory for object and dump files
# used by modules build
ifndef THUMB_FW
O=.o/
else
O=.o2/
endif
SILENT=SILENT
##########################################################################
include $(topdir)makefile_env.inc
##########################################################################
.PHONY: all
all: all-recursive
.PHONY: clean
clean: clean-recursive
.PHONY: distclean
distclean: distclean-recursive
.dep:
mkdir .dep
clean-recursive:
@for i in $(SUBDIRS); do \
echo \>\> Cleaning in $(FOLDER)$$i; \
$(MAKE) -C $$i FOLDER="$(FOLDER)$$i/" clean || exit 1; \
done
distclean-recursive:
@for i in $(SUBDIRS); do \
echo \>\> Distcleaning in $(FOLDER)$$i; \
$(MAKE) -C $$i FOLDER="$(FOLDER)$$i/" distclean || exit 1; \
done
all-recursive:
@for i in $(SUBDIRS); do \
echo \>\> Entering to $(FOLDER)$$i; \
$(MAKE) -C $$i FOLDER="$(FOLDER)$$i/" || exit 1; \
echo \<\< Leaving $(FOLDER)$$i; \
done
depend-recursive:
@for i in $(SUBDIRS); do \
echo \>\> Entering to $(FOLDER)$$i; \
$(MAKE) -C $$i FOLDER="$(FOLDER)$$i/" depend || exit 1; \
echo \<\< Leaving $(FOLDER)$$i; \
done
ifdef SILENT
.SILENT:
endif
# Define empty recipes for source files (including the makefiles)
# to prevent make from trying implicit rules to create them. Speeds up build process
Makefile: ;
makefile: ;
$(topdir)makefile_base.inc: ;
$(topdir)buildconf.inc: ;
$(topdir)localbuildconf.inc: ;
$(topdir)version.inc: ;
$(topdir)revision.inc: ;
$(cam)/makefile.inc: ;
*.c: ;
*.txt: ;
*.sh: ;
reversebytes.S: ;
callfunc.S: ;
setjmp.S: ;