29 lines
994 B
Makefile
29 lines
994 B
Makefile
# rd - privilege elevator
|
|
# Copyright (C) 2022-2023 Olive <hello@grasswren.net>
|
|
# see LICENCE file for licensing information
|
|
|
|
VERSION = 6.0.0
|
|
|
|
PREFIX = /usr/local
|
|
MANPREFIX = $(PREFIX)/share/man
|
|
|
|
WPROFILE = -Wall -Wextra -Wstrict-prototypes -Wmissing-declarations -Wshadow \
|
|
-Wswitch-default -Wunreachable-code -Wcast-align -Wpointer-arith -Wcast-qual \
|
|
-Wbad-function-cast -Winline -Wundef -Wnested-externs -Wwrite-strings \
|
|
-Wno-unused-parameter -Wfloat-equal -Wpedantic
|
|
STD = -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L
|
|
LIB = -lcrypt # with -DPASS
|
|
|
|
GROUP = wheel # change to 'users' to permit any user to run
|
|
PTIME = 300 # seconds to allow passwd-less authorisation, with -DSAVE
|
|
|
|
# PASS - passwd authorisation
|
|
# SAVE - time-based passwd-less authorisation
|
|
# TERM - terminal device access
|
|
# VARS - -c flag for environment clearing
|
|
# USER - -u flag for alternative user login
|
|
MAC = -DPASS -DSAVE -DTERM -DVARS -DUSER -DPTIME=$(PTIME)
|
|
|
|
CFLAGS = $(WPROFILE) $(STD) $(MAC) -Os
|
|
LDFLAGS = $(LIB)
|