Skip to content

Commit

Permalink
Update Makefile for new libfontforge.so linking
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlcctrlv committed Oct 27, 2022
1 parent 909a6d6 commit 3fbeb07
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
SHELL := /bin/bash
.PHONY: all fmt man

export RUST_LOG := debug
export RUST_BACKTRACE := 1

DEBUGARGS := $(if $(DEBUG),,"--release")

FONTFORGE := $(if $(FONTFORGE),"fontforge","")

.PHONY: all
ifdef FONTFORGE
RUSTFLAGS += -L/opt/lib -L/usr/local/lib
endif
all:
RUSTFLAGS="${RUSTFLAGS}" cargo build $(DEBUGARGS) --features $(FONTFORGE)
set -x; \
[ $$FONTFORGE = "y" ] && FONTFORGE_FLAG="--features fontforge" && NIGHTLY_FLAG="+nightly"; \
RUSTFLAGS="${RUSTFLAGS}" cargo $$NIGHTLY_FLAG build $(DEBUGARGS) $$FONTFORGE_FLAG

.PHONY: fmt
fmt:
find src -type f -iname '*.rs' | parallel --bar RUST_LOG=error rustfmt {}

.PHONY: man
man:
rm -f /tmp/MFEKstroke*
LD_LIBRARY_PATH=/opt/lib help2man -N 'target/debug/MFEKstroke CWS' --no-discard-stderr | tail -n +5 | head -n -3 > /tmp/MFEKstrokeCWS
Expand Down

0 comments on commit 3fbeb07

Please sign in to comment.