forked from bonsai/coreutils
30 lines
1.1 KiB
Makefile
30 lines
1.1 KiB
Makefile
# Copyright (c) 2023–2024 Emma Tebibyte <emma@tebibyte.media>
|
||
# Copyright (c) 2023–2024 DTB <trinity@trinity.moe>
|
||
# Copyright (c) 2023 Sasha Koshka <sashakoshka@tebibyte.media>
|
||
# Copyright (c) 2024 Aaditya Aryal <aryalaadi123@gmail.com>
|
||
# 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.
|
||
|
||
# if using BSD make(1), remove these pragmas because they break it
|
||
.PRAGMA: posix_202x # future POSIX standard support à la pdpmake(1)
|
||
.PRAGMA: command_comment # breaks without this?
|
||
|
||
DESTDIR ?= dist
|
||
PREFIX ?= /usr/local
|
||
BUILD ?= build
|
||
|
||
SYSEXITS != printf '\043include <sysexits.h>\n' | cpp -M - | sed 's/ /\n/g' \
|
||
| sed -n 's/sysexits\.h//p' || printf 'include\n'
|
||
|
||
CC ?= cc
|
||
RUSTC ?= rustc
|
||
RUSTLIBS = --extern getopt=../$(BUILD)/o/libgetopt.rlib \
|
||
--extern sysexits=../$(BUILD)/o/libsysexits.rlib \
|
||
--extern strerror=../$(BUILD)/o/libstrerror.rlib
|
||
|
||
CFLAGs += --std=c99 -Wall -pedantic -Werror
|
||
CFLAGS += -I$(SYSEXITS)
|