summarylogtreecommitdiffstats
path: root/00-Makefile.patch
blob: 211e138b5e15502b661e5800809772b0c9587f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- 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)