2007-01-14 23:29:15 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
2007-01-15 17:45:04 +00:00
|
|
|
# $Id$
|
2007-01-14 23:29:15 +00:00
|
|
|
#
|
|
|
|
|
2011-09-13 20:30:37 +00:00
|
|
|
ifndef V
|
|
|
|
SILENT=@
|
|
|
|
endif
|
|
|
|
|
2008-02-13 16:40:57 +00:00
|
|
|
# Needed to build the features list.
|
|
|
|
INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
|
|
|
|
-I$(BUILDDIR)/bitmaps -I$(OBJDIR)
|
2007-06-21 15:35:47 +00:00
|
|
|
|
2011-11-05 10:53:10 +00:00
|
|
|
.PHONY: all buildmanual clean objdir-check
|
2007-06-21 15:35:47 +00:00
|
|
|
MANFILE := rockbox-build
|
2006-02-06 07:25:25 +00:00
|
|
|
|
2010-05-30 23:18:06 +00:00
|
|
|
VERSION= `$(TOOLSDIR)/version.sh $(ROOTDIR)`
|
|
|
|
|
2011-11-05 10:53:10 +00:00
|
|
|
.PHONY: $(OBJDIR)/version.tex $(OBJDIR)/$(MANFILE).tex
|
|
|
|
|
2006-07-20 18:07:46 +00:00
|
|
|
all: manual-pdf
|
2006-02-06 07:25:25 +00:00
|
|
|
|
2011-11-05 10:53:10 +00:00
|
|
|
features: $(OBJDIR)/features.tex
|
2008-02-13 16:40:57 +00:00
|
|
|
|
2011-11-05 10:53:10 +00:00
|
|
|
objdir-check:
|
2006-07-20 18:07:46 +00:00
|
|
|
@if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
|
2011-11-05 10:53:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
manual-prep: objdir-check rockbox.tex $(OBJDIR)/CREDITS.tex $(OBJDIR)/version.tex $(OBJDIR)/$(MANFILE).tex
|
|
|
|
$(SILENT)mkdir -p $(OBJDIR)
|
|
|
|
$(SILENT)find * -type d \! -regex '.*\.svn.*' -exec mkdir -p $(OBJDIR)/{} \;
|
|
|
|
$(SILENT)find * -type f \! -regex '.*\.svn.*' -exec cp {} $(OBJDIR)/{} \;
|
|
|
|
$(SILENT)mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile
|
|
|
|
|
|
|
|
$(OBJDIR)/$(MANFILE).tex:
|
|
|
|
@echo "creating $(notdir $@)"
|
|
|
|
$(SILENT)printf "\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $(OBJDIR)/$(MANFILE).tex
|
|
|
|
$(SILENT)printf "\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $(OBJDIR)/$(MANFILE).tex
|
|
|
|
$(SILENT)printf "\\\\input{rockbox.tex}\n" >> $(OBJDIR)/$(MANFILE).tex
|
|
|
|
|
|
|
|
$(OBJDIR)/CREDITS.tex: $(DOCSDIR)/CREDITS
|
|
|
|
@echo "processing $(notdir $^)"
|
|
|
|
$(SILENT)perl credits.pl < $(DOCSDIR)/CREDITS > $(OBJDIR)/CREDITS.tex
|
|
|
|
|
|
|
|
$(OBJDIR)/version.tex:
|
|
|
|
@echo "creating $(notdir $@)"
|
|
|
|
$(SILENT)printf "%s%%" $(VERSION) > $(OBJDIR)/version.tex
|
|
|
|
|
|
|
|
$(OBJDIR)/features.tex: $(ROOTDIR)/apps/features.txt
|
2011-09-13 20:30:37 +00:00
|
|
|
@echo "processing $(notdir $^)"
|
2008-02-13 16:40:57 +00:00
|
|
|
$(SILENT)mkdir -p `dirname $@`
|
|
|
|
$(SILENT)cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
|
|
|
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \
|
|
|
|
grep -v "^\#" | grep -v "^$$" > $@; \
|
2011-11-10 14:32:11 +00:00
|
|
|
for f in `cat $(OBJDIR)/features.tex`; do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}" ; done ; \
|
2008-04-07 17:27:37 +00:00
|
|
|
printf "$$feat" >$(OBJDIR)/features.tex
|
2008-02-13 16:40:57 +00:00
|
|
|
|
2011-11-05 10:53:10 +00:00
|
|
|
manual-pdf: objdir-check features manual-prep rockbox.tex
|
|
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) buildmanual
|
2006-02-06 07:25:25 +00:00
|
|
|
|
2011-11-05 10:53:10 +00:00
|
|
|
manual-html: objdir-check features manual-prep rockbox.tex
|
|
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) buildhtml
|
2006-07-20 18:07:46 +00:00
|
|
|
|
2006-10-23 18:09:38 +00:00
|
|
|
manual-txt: manual-html
|
2011-11-05 10:53:10 +00:00
|
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) buildtxt
|
2006-10-23 18:09:38 +00:00
|
|
|
|
|
|
|
manual-txt-zip: manual-txt
|
2011-11-05 10:53:10 +00:00
|
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) txtzip
|
2006-10-23 18:09:38 +00:00
|
|
|
|
2006-07-20 18:07:46 +00:00
|
|
|
manual-zip: manual-html
|
2011-11-05 10:53:10 +00:00
|
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) htmlzip
|
2006-07-20 18:07:46 +00:00
|
|
|
|
2011-11-05 10:53:10 +00:00
|
|
|
clean: objdir-check
|
|
|
|
$(SILENT)rm -rf $(OBJDIR)/manual $(OBJDIR)/*.pdf
|
|
|
|
$(SILENT)rm -rf $(OBJDIR)/html $(OBJDIR)/txt
|