TEXFLAGS ?= -halt-on-error -output-format pdf -output-directory output TITLE = Free_software_boot .PHONY: all clean medias archive ############### # Phony rules # ############### all: output/$(TITLE).pdf archive: git archive --format=tar --prefix=LibrePlanet2023/ HEAD -o LibrePlanet2023.tar clean: rm -rf output ################ # Main targets # ################ output: mkdir -p output output/$(TITLE).pdf: \ output/HP_small.jpeg \ output/Libreoffice-flyer.jpg \ output/SOIC-16_small.jpeg \ output/Thinkpad_small.jpeg \ output/W0128-NDdL_ZaD_Preparation_56926_small.jpg \ output/WD_Caviar_Green_WD10EADS_-_Controller_-_Winbond_25X20ALNIG-91999_small.jpg \ output/WiFi.jpg \ output/X200_small.jpeg \ $(TITLE).tex \ output pdflatex $(TEXFLAGS) '\providecommand\locale{en}\input{$(TITLE).tex}' 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: pictures/applications/%.svg output gm convert $< $@ output/%.jpg: pictures/%.svg output gm convert $< $@ output/%.jpg: pictures/%.xcf output gm convert $< $@ # Space saved: # - smart_phones_shop.jpg: from 3.0M to 243K # - googlag.jpg: from 2.4M to 101K output/%_small.jpg: pictures/%.jpg gm convert -resize 25% -quality 80 $< $@ output/%_small.jpeg: pictures/%.jpeg gm convert -resize 25% -quality 80 $< $@ output/%_small.jpeg: pictures/%.xcf 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 $? $@