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
|
|
|
|
2019-08-05 01:38:06 +00:00
|
|
|
VERSION ?= $(shell $(TOOLSDIR)/version.sh $(ROOTDIR))
|
2010-05-30 23:18:06 +00:00
|
|
|
|
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)/{} \;
|
2012-05-20 15:17:49 +00:00
|
|
|
$(SILENT)find -L * -type f \! -regex '.*\.svn.*' -exec cp {} $(OBJDIR)/{} \;
|
2011-11-05 10:53:10 +00:00
|
|
|
$(SILENT)mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile
|
|
|
|
|
|
|
|
$(OBJDIR)/$(MANFILE).tex:
|
|
|
|
@echo "creating $(notdir $@)"
|
2011-11-10 19:40:36 +00:00
|
|
|
$(SILENT)printf "\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $@
|
|
|
|
$(SILENT)printf "\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $@
|
|
|
|
$(SILENT)printf "\\\\input{rockbox.tex}\n" >> $@
|
2011-11-05 10:53:10 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/CREDITS.tex: $(DOCSDIR)/CREDITS
|
|
|
|
@echo "processing $(notdir $^)"
|
2012-07-03 20:53:01 +00:00
|
|
|
$(SILENT)mkdir -p $(OBJDIR)
|
2011-11-10 19:40:36 +00:00
|
|
|
$(SILENT)perl credits.pl < $(DOCSDIR)/CREDITS > $@
|
2011-11-05 10:53:10 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/version.tex:
|
|
|
|
@echo "creating $(notdir $@)"
|
2012-07-03 20:53:01 +00:00
|
|
|
$(SILENT)mkdir -p $(OBJDIR)
|
2011-11-10 19:40:36 +00:00
|
|
|
$(SILENT)printf "%s%%" $(VERSION) > $@
|
2011-11-05 10:53:10 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/features.tex: $(ROOTDIR)/apps/features.txt
|
2011-09-13 20:30:37 +00:00
|
|
|
@echo "processing $(notdir $^)"
|
2012-07-03 20:53:01 +00:00
|
|
|
$(SILENT)mkdir -p $(OBJDIR)
|
2008-02-13 16:40:57 +00:00
|
|
|
$(SILENT)mkdir -p `dirname $@`
|
2011-11-10 19:40:36 +00:00
|
|
|
$(SILENT) for f in \
|
|
|
|
$$(cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
|
|
|
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" \
|
|
|
|
-imacros "button.h" - | grep -v "^\#" | grep -v "^$$"); \
|
|
|
|
do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done ; \
|
|
|
|
printf "$$feat" > $@
|
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
|