28 lines
723 B
Makefile
28 lines
723 B
Makefile
# Copyright (c) 2023 Emma Tebibyte <emma@tebibyte.media>
|
|
# SPDX-License-Identifier: FSFAP
|
|
#
|
|
# Copying and distribution of this file, with or without modification, are
|
|
# permitted in any medium without royalty provided the copyright notice and this
|
|
# notice are preserved. This file is offered as-is, without any warranty.
|
|
|
|
.POSIX:
|
|
|
|
PREFIX=/usr/local
|
|
CFLAGS=-O3 -s -Wl,-z,noseparate-code,-z,nosectionheader -flto
|
|
LD_LIBRARY_PATH=/usr/local/lib
|
|
|
|
build: build_dir tokiponize
|
|
|
|
clean: build_dir
|
|
rm -rf build/
|
|
|
|
tokiponize: tokiponize.c build_dir
|
|
cc $(CFLAGS) -L$(LD_LIBRARY_PATH) -lyac -o build/tokiponize tokiponize.c
|
|
|
|
build_dir:
|
|
mkdir -p build
|
|
|
|
install: build
|
|
mkdir -p $(PREFIX)/bin
|
|
cp -f build/tokiponize $(PREFIX)/bin/
|