Dominik Riebeling | cb9fdf7 | 2007-01-14 23:29:15 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
Dominik Riebeling | 6de815b | 2007-01-15 17:45:04 +0000 | [diff] [blame] | 7 | # $Id$ |
Dominik Riebeling | cb9fdf7 | 2007-01-14 23:29:15 +0000 | [diff] [blame] | 8 | # |
| 9 | |
Nils Wallménius | 22a5c60 | 2008-02-13 16:40:57 +0000 | [diff] [blame] | 10 | # Needed to build the features list. |
| 11 | INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ |
| 12 | -I$(BUILDDIR)/bitmaps -I$(OBJDIR) |
Dominik Riebeling | 49af12a | 2007-06-21 15:35:47 +0000 | [diff] [blame] | 13 | |
Martin Arver | e425c8e | 2006-03-16 11:05:22 +0000 | [diff] [blame] | 14 | .PHONY: all buildmanual clean |
Dominik Riebeling | 49af12a | 2007-06-21 15:35:47 +0000 | [diff] [blame] | 15 | MANFILE := rockbox-build |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 16 | |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 17 | all: manual-pdf |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 18 | |
Nils Wallménius | 22a5c60 | 2008-02-13 16:40:57 +0000 | [diff] [blame] | 19 | features: $(OBJDIR)/features |
| 20 | |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 21 | manual-prep: rockbox.tex |
| 22 | @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi |
Martin Arver | e425c8e | 2006-03-16 11:05:22 +0000 | [diff] [blame] | 23 | @mkdir -p $(OBJDIR) |
Dominik Riebeling | da6a078 | 2007-01-16 20:24:13 +0000 | [diff] [blame] | 24 | @find * -type d \! -regex '.*\.svn.*' -exec mkdir -p $(OBJDIR)/{} \; |
Dominik Riebeling | 49af12a | 2007-06-21 15:35:47 +0000 | [diff] [blame] | 25 | @find * -type f \! -regex '.*\.svn.*' -exec cp -u {} $(OBJDIR)/{} \; |
| 26 | @printf "%s%%" $(VERSION) > $(OBJDIR)/version.tex |
Dominik Riebeling | 3273418 | 2008-04-07 17:27:37 +0000 | [diff] [blame] | 27 | @perl credits.pl < $(DOCSDIR)/CREDITS > $(OBJDIR)/CREDITS.tex |
Dominik Riebeling | 49af12a | 2007-06-21 15:35:47 +0000 | [diff] [blame] | 28 | @printf "\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $(OBJDIR)/$(MANFILE).tex |
| 29 | @printf "\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $(OBJDIR)/$(MANFILE).tex |
| 30 | @printf "\\\\input{rockbox.tex}\n" >> $(OBJDIR)/$(MANFILE).tex |
Martin Arver | e425c8e | 2006-03-16 11:05:22 +0000 | [diff] [blame] | 31 | @mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 32 | |
Nils Wallménius | 22a5c60 | 2008-02-13 16:40:57 +0000 | [diff] [blame] | 33 | $(OBJDIR)/features: $(ROOTDIR)/apps/features.txt |
| 34 | $(SILENT)mkdir -p `dirname $@` |
| 35 | $(SILENT)cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ |
| 36 | $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \ |
| 37 | grep -v "^\#" | grep -v "^$$" > $@; \ |
Dominik Riebeling | 3273418 | 2008-04-07 17:27:37 +0000 | [diff] [blame] | 38 | for f in `cat $(OBJDIR)/features`; do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}" ; done ; \ |
| 39 | printf "$$feat" >$(OBJDIR)/features.tex |
Nils Wallménius | 22a5c60 | 2008-02-13 16:40:57 +0000 | [diff] [blame] | 40 | |
| 41 | manual-pdf: features manual-prep rockbox.tex |
Dominik Riebeling | abac739 | 2006-10-23 18:09:38 +0000 | [diff] [blame] | 42 | $(MAKE) -C $(OBJDIR) buildmanual |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 43 | |
Dominik Riebeling | a0584ae | 2008-11-16 12:42:08 +0000 | [diff] [blame] | 44 | manual-html: features manual-prep rockbox.tex |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 45 | $(MAKE) -C $(OBJDIR) buildhtml |
| 46 | |
Dominik Riebeling | abac739 | 2006-10-23 18:09:38 +0000 | [diff] [blame] | 47 | manual-txt: manual-html |
| 48 | $(MAKE) -C $(OBJDIR) buildtxt |
| 49 | |
| 50 | manual-txt-zip: manual-txt |
| 51 | $(MAKE) -C $(OBJDIR) txtzip |
| 52 | |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 53 | manual-zip: manual-html |
| 54 | $(MAKE) -C $(OBJDIR) htmlzip |
| 55 | |
Martin Arver | e425c8e | 2006-03-16 11:05:22 +0000 | [diff] [blame] | 56 | clean: |
Jonas Häggqvist | a895738 | 2006-11-06 10:21:03 +0000 | [diff] [blame] | 57 | @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi |
Martin Arver | e425c8e | 2006-03-16 11:05:22 +0000 | [diff] [blame] | 58 | @rm -rf $(OBJDIR)/manual $(OBJDIR)/*.pdf |
Dominik Riebeling | abac739 | 2006-10-23 18:09:38 +0000 | [diff] [blame] | 59 | @rm -rf $(OBJJDIR)/html $(OBJDIR)/txt |