forked from ports/contrib
55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
--- src/doas-6.3p2/Makefile 2020-08-07 23:42:52.000000000 +0200
|
|
+++ Makefile 2020-08-18 17:14:50.982152763 +0200
|
|
@@ -2,10 +2,10 @@
|
|
CC?=clang
|
|
YACC?=yacc
|
|
BIN=doas
|
|
-PREFIX?=/usr/local
|
|
+PREFIX=/usr
|
|
MANDIR?=$(DESTDIR)$(PREFIX)/man
|
|
-SYSCONFDIR?=$(DESTDIR)$(PREFIX)/etc
|
|
-OBJECTS=doas.o env.o compat/execvpe.o compat/reallocarray.o y.tab.o
|
|
+SYSCONFDIR?=$(DESTDIR)/etc
|
|
+OBJECTS=doas.o env.o compat/execvpe.o compat/reallocarray.o y.tab.o
|
|
OPT?=-O2
|
|
# Can set GLOBAL_PATH here to set PATH for target user.
|
|
# TARGETPATH=-DGLOBAL_PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:\"
|
|
@@ -13,32 +13,11 @@
|
|
CPPFLAGS+=-include compat/compat.h
|
|
LDFLAGS+=-lpam
|
|
UNAME_S := $(shell uname -s)
|
|
-ifeq ($(UNAME_S),Linux)
|
|
- LDFLAGS+=-lpam_misc
|
|
- CPPFLAGS+=-Icompat
|
|
- CFLAGS+=-D_GNU_SOURCE
|
|
- COMPAT+=closefrom.o errc.o getprogname.o setprogname.o strlcat.o strlcpy.o strtonum.o verrc.o
|
|
- OBJECTS+=$(COMPAT:%.o=compat/%.o)
|
|
-endif
|
|
-ifeq ($(UNAME_S),FreeBSD)
|
|
- CFLAGS+=-DHAVE_LOGIN_CAP_H
|
|
- LDFLAGS+=-lutil
|
|
-endif
|
|
-ifeq ($(UNAME_S),SunOS)
|
|
- SAFE_PATH?=/bin:/sbin:/usr/bin:/usr/sbin:$(PREFIX)/bin:$(PREFIX)/sbin
|
|
- GLOBAL_PATH?=/bin:/sbin:/usr/bin:/usr/sbin:$(PREFIX)/bin:$(PREFIX)/sbin
|
|
- CPPFLAGS+=-Icompat
|
|
- CFLAGS+=-DSOLARIS_PAM -DSAFE_PATH=\"$(SAFE_PATH)\" -DGLOBAL_PATH=\"$(GLOBAL_PATH)\"
|
|
- COMPAT=errc.o pm_pam_conv.o setresuid.o verrc.o
|
|
- OBJECTS+=$(COMPAT:%.o=compat/%.o)
|
|
-endif
|
|
-ifeq ($(UNAME_S),Darwin)
|
|
- CPPFLAGS+=-Icompat
|
|
- COMPAT+=bsd-closefrom.o
|
|
- OBJECTS+=$(COMPAT:%.o=compat/%.o)
|
|
- # On MacOS the default man page path is /usr/local/share/man
|
|
- MANDIR=$(DESTDIR)$(PREFIX)/share/man
|
|
-endif
|
|
+LDFLAGS+=-lpam_misc
|
|
+CPPFLAGS+=-Icompat
|
|
+CFLAGS+=-D_GNU_SOURCE
|
|
+COMPAT+=closefrom.o errc.o getprogname.o setprogname.o strlcat.o strlcpy.o strtonum.o verrc.o
|
|
+OBJECTS+=$(COMPAT:%.o=compat/%.o)
|
|
|
|
all: $(OBJECTS) doas.1.final doas.conf.5.final
|
|
$(CC) -o $(BIN) $(OBJECTS) $(LDFLAGS)
|