WIP: Adds PDF of binary

Work towards #11

TODO:

* The PS and the PDF don't actually have the correct dimensions. A part
of the data is cut-off of the PS and the PDF has no margins.
This commit is contained in:
Colin Dean 2018-04-08 14:41:59 -04:00
parent c3d48030db
commit 03282c425b

View File

@ -22,6 +22,9 @@ ARCHIVE_PATH=optar-$(VERSION)-$(OS)-$(ARCH).tar.gz
BINARIES=optar unoptar BINARIES=optar unoptar
EXECUTABLES=$(BINARIES) pgm2ps EXECUTABLES=$(BINARIES) pgm2ps
ARCHIVE_PATH_TAR=$(ARCHIVE_PATH).tar
ARCHIVE_PATH_PDF=$(ARCHIVE_PATH_TAR).pdf
all: optar unoptar all: optar unoptar
install: install:
@ -36,6 +39,8 @@ uninstall:
clean: clean:
rm -f $(BINARIES) optar-*.tar.gz golay_codes.c *.o rm -f $(BINARIES) optar-*.tar.gz golay_codes.c *.o
rm -f $(ARCHIVE_PATH_PDF) $(ARCHIVE_PATH_TAR)
rm -f *.pgm *.ps
common.o: common.c optar.h common.o: common.c optar.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
@ -71,3 +76,12 @@ archive: $(ARCHIVE_PATH)
$(ARCHIVE_PATH): $(EXECUTABLES) COPYING README.md $(ARCHIVE_PATH): $(EXECUTABLES) COPYING README.md
tar czvf $@ $^ tar czvf $@ $^
archive_pdf: $(ARCHIVE_PATH_PDF)
$(ARCHIVE_PATH_PDF): $(ARCHIVE_PATH) optar
#This is necessary because tar can be 0-padded and gzip cannot
tar cvf $(ARCHIVE_PATH_TAR) $<
./optar $(ARCHIVE_PATH_TAR) $(ARCHIVE_PATH_TAR)
./pgm2ps *.pgm
convert -density 600x600 -quality 100 *.ps $@