diff options
Diffstat (limited to '37c3/Replicant_struggle/unfinished-latex-version/Makefile')
| -rw-r--r-- | 37c3/Replicant_struggle/unfinished-latex-version/Makefile | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/37c3/Replicant_struggle/unfinished-latex-version/Makefile b/37c3/Replicant_struggle/unfinished-latex-version/Makefile new file mode 100644 index 0000000..557d109 --- /dev/null +++ b/37c3/Replicant_struggle/unfinished-latex-version/Makefile @@ -0,0 +1,113 @@ +TEXFLAGS ?= -halt-on-error -output-format pdf -output-directory output +TITLE = Struggle_for_independence + +TOPDIR = ../../.. + +.PHONY: all clean medias archive + +############### +# Phony rules # +############### +all: output/$(TITLE).pdf + +archive: + git archive --format=tar --prefix=LibrePlanet2022/ HEAD -o LibrePlanet2022.tar + +clean: + rm -rf output + +################ +# Main targets # +################ +output: + mkdir output + +output/$(TITLE).pdf: \ + Struggle_for_independence.tex \ + output \ + output/4-freedoms.jpg \ + output/android.jpg \ + output/android_logo.jpg \ + output/anti_drm_protest.jpg \ + output/anti_smartphones.jpg \ + output/electronic_waste_small.jpg \ + output/framework.jpg \ + output/freedo.jpg \ + output/googlag_small.jpg \ + output/i9300_left.jpg \ + output/linux.jpg \ + output/motorola_a780_small.jpg \ + output/n900.jpg \ + output/phist.jpg \ + output/raised_fist_small.jpg \ + output/replicant_logo.jpg \ + output/smart_phones_shop_small.jpg \ + output/tablets.jpg \ + output/the_leader_of_the_luddites_small.jpg \ + output/we_can_do_it_small.jpg \ + output/wifi.jpg \ + output/worker.jpg + pdflatex $(TEXFLAGS) '\providecommand\locale{en}\input{$(TITLE).tex}' + pdflatex $(TEXFLAGS) '\providecommand\locale{en}\input{$(TITLE).tex}' + du -hs $@ + +############################## +# Automatic depdencies rules # +############################## +output/%.jpg: dot/%.dot + mkdir -p output + dot -T jpg $< > $@ + +output/%.jpg: $(TOPDIR)/common/images/%.jpg output + convert $< $@ + +output/%.jpg: $(TOPDIR)/common/images/%.png output + convert $< $@ + +output/%.jpg: $(TOPDIR)/common/images/%.svg output + convert $< $@ + +# Space saved: +# - we_can_do_it.jpg: from 61M to 456K +# - raised_fist.jpg: from 7.9M to 104K +# - the_leader_of_the_luddites.jpg: from 6.1M to 291K +# - smart_phones_shop.jpg: from 3.0M to 243K +# - electronic_waste.jpg: from 2.8M to 168K +# - googlag.jpg: from 2.4M to 101K +# - motorola_a780.jpg: from 1.8M to 64k +output/%_small.jpg: $(TOPDIR)/common/images/%.jpg + convert -resize 25% -quality 80 $< $@ + +################################# +# Images with specific settings # +################################# +# -resize and -quality makes the image go from 1.1M to 48k +output/anti_drm_protest.jpg: $(TOPDIR)/common/images/anti_drm_protest.jpg output + convert $< -crop 50%x0%+1440+0 -resize 25% -quality 80 $@ + +output/i9300_hardware.jpg: $(TOPDIR)/common/images/i9300_hardware.svg output + convert $< $@ + +output/i9300_left.jpg: output/i9300_hardware.jpg output + convert $< -crop 50%x0%+0+0 $@ + +# -resize and -quality makes the image go from 8.5M to 124k +output/n900.jpg: $(TOPDIR)/common/images/N900_xterm.JPG $(TOPDIR)/common/images/Nokia_N900-6.jpg + mkdir -p output + convert -append -gravity center -resize 25% -quality 80 $? $@ + +output/replicant_logo.jpg: $(TOPDIR)/external_resources/vendor_replicant_artwork/replicant_logo_white.png output + convert $< $@ + +output/tablets.jpg: \ + $(TOPDIR)/external_resources/replicant_website/images/supported-devices/p3100.png \ + $(TOPDIR)/external_resources/replicant_website/images/supported-devices/p5100.png + mkdir -p output + convert -append $? $@ + +output/wifi.jpg: \ + $(TOPDIR)/common/images/tehnoetic-n150-mini-wifi-adapter-back-500x500.png \ + $(TOPDIR)/common/images/tet-otg-side-500x500.jpg \ + $(TOPDIR)/common/images/Wifi.png + mkdir -p output + convert -append -gravity center $? $@ |
