2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
14 # Needed to build the features list.
15 INCLUDES
= $(TARGET_INC
) -I
$(FIRMDIR
)/include -I
$(FIRMDIR
)/export -I.
-I
$(BUILDDIR
) \
16 -I
$(BUILDDIR
)/bitmaps
-I
$(OBJDIR
)
18 .PHONY
: all buildmanual
clean objdir-check
19 MANFILE
:= rockbox-build
21 VERSION
= `$(TOOLSDIR)/version.sh $(ROOTDIR)`
23 .PHONY
: $(OBJDIR
)/version.
tex $(OBJDIR
)/$(MANFILE
).
tex
27 features
: $(OBJDIR
)/features.
tex
30 @if
[ "$(OBJDIR)" = "" ]; then echo Run make in you build directory
!; false
; fi
33 manual-prep
: objdir-check rockbox.
tex $(OBJDIR
)/CREDITS.
tex $(OBJDIR
)/version.
tex $(OBJDIR
)/$(MANFILE
).
tex
34 $(SILENT
)mkdir
-p
$(OBJDIR
)
35 $(SILENT
)find
* -type d \
! -regex
'.*\.svn.*' -exec mkdir
-p
$(OBJDIR
)/{} \
;
36 $(SILENT
)find
-L
* -type f \
! -regex
'.*\.svn.*' -exec cp
{} $(OBJDIR
)/{} \
;
37 $(SILENT
)mv
$(OBJDIR
)/Makefile.pdflatex
$(OBJDIR
)/Makefile
39 $(OBJDIR
)/$(MANFILE
).
tex:
40 @echo
"creating $(notdir $@)"
41 $(SILENT
)printf
"\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $@
42 $(SILENT
)printf
"\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $@
43 $(SILENT
)printf
"\\\\input{rockbox.tex}\n" >> $@
45 $(OBJDIR
)/CREDITS.
tex: $(DOCSDIR
)/CREDITS
46 @echo
"processing $(notdir $^)"
47 $(SILENT
)mkdir
-p
$(OBJDIR
)
48 $(SILENT
)perl credits.pl
< $(DOCSDIR
)/CREDITS
> $@
50 $(OBJDIR
)/version.
tex:
51 @echo
"creating $(notdir $@)"
52 $(SILENT
)mkdir
-p
$(OBJDIR
)
53 $(SILENT
)printf
"%s%%" $(VERSION
) > $@
55 $(OBJDIR
)/features.
tex: $(ROOTDIR
)/apps
/features.txt
56 @echo
"processing $(notdir $^)"
57 $(SILENT
)mkdir
-p
$(OBJDIR
)
58 $(SILENT
)mkdir
-p
`dirname $@`
60 $$(cat
$< |
$(HOSTCC
) -DMEMORYSIZE
=$(MEMORYSIZE
) $(INCLUDES
) \
61 $(TARGET
) $(DEFINES
) $(EXTRA_DEFINES
) -E
-P
-imacros
"config.h" \
62 -imacros
"button.h" - | grep
-v
"^\#" | grep
-v
"^$$"); \
63 do feat
="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done
; \
66 manual-pdf
: objdir-check features manual-prep rockbox.
tex
67 $(SILENT
)$(MAKE
) -C
$(OBJDIR
) buildmanual
69 manual-html
: objdir-check features manual-prep rockbox.
tex
70 $(SILENT
)$(MAKE
) -C
$(OBJDIR
) buildhtml
72 manual-txt
: manual-html
73 $(SILENT
)$(MAKE
) -C
$(OBJDIR
) buildtxt
75 manual-txt-zip
: manual-txt
76 $(SILENT
)$(MAKE
) -C
$(OBJDIR
) txtzip
78 manual-zip
: manual-html
79 $(SILENT
)$(MAKE
) -C
$(OBJDIR
) htmlzip
82 $(SILENT
)rm -rf
$(OBJDIR
)/manual
$(OBJDIR
)/*.pdf
83 $(SILENT
)rm -rf
$(OBJDIR
)/html
$(OBJDIR
)/txt