TEXFLAGS ?= -halt-on-error -output-format pdf -output-directory output TITLE = How_Replicant_uses_Guix .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 -p output output/$(TITLE).pdf: \ $(TITLE).tex \ output \ output/4-freedoms.jpg \ output/android_logo.jpg \ output/anti_drm_protest.jpg \ output/anti_smartphones.jpg \ output/electronic_waste_small.jpg \ output/F-Droid_Logo_4.jpg \ output/framework.jpg \ output/googlag_small.jpg \ output/i9300_hardware.jpg \ output/phist.jpg \ output/raised_fist_small.jpg \ output/replicant_logo.jpg \ output/smart_phones_shop_small.jpg \ output/telephony-stack_hardware.jpg \ output/telephony-stack_software.jpg \ output/we_can_do_it_small.jpg \ output/the_leader_of_the_luddites_small.jpg \ output/wifi.jpg \ output/worker.jpg pdflatex $(TEXFLAGS) '\providecommand\locale{en}\input{$(TITLE).tex}' @echo skipping pdflatex $(TEXFLAGS) '\providecommand\locale{en}\input{$(TITLE).tex}' du -hs $@ ############################## # Automatic depdencies rules # ############################## output/%.jpg: ../Guix-birthday-2022/dot/%.dot mkdir -p output dot -T jpg $< > $@ output/%.jpg: ../common/images/%.jpg output gm convert $< $@ output/%.jpg: ../common/images/%.png output gm convert $< $@ output/%.jpg: ../common/images/%.svg output gm convert $< $@ # Space saved: # - smart_phones_shop.jpg: from 3.0M to 243K # - googlag.jpg: from 2.4M to 101K output/%_small.jpg: ../common/images/%.jpg gm convert -resize 25% -quality 80 $< $@ ################################# # Images with specific settings # ################################# # -resize and -quality makes the image go from 1.1M to 48k output/i9300_hardware.jpg: ../common/images/i9300_hardware.svg output gm convert $< $@ output/replicant_logo.jpg: ../external_resources/vendor_replicant_artwork/replicant_logo_white.png output gm convert $< $@ output/wifi.jpg: \ ../common/images/tehnoetic-n150-mini-wifi-adapter-back-500x500.png \ ../common/images/tet-otg-side-500x500.jpg \ ../common/images/Wifi.png mkdir -p output gm convert -append -gravity center $? $@