blob: 8d716a8631c1cbe481da082711484cc866acb768 (
plain) (
blame)
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
|
--- Makefile.orig 2016-07-07 03:21:44 UTC
+++ Makefile
@@ -15,17 +15,21 @@ CRYPT_LIB = -lcrypt
# tree with your OpenSSL installation - depending on how you installed it,
# it may be in /usr/local instead of /usr/local/ssl.
#SSL_TREE = /usr/local/ssl
-#SSL_DEFS = -DUSE_SSL
-#SSL_INC = -I$(SSL_TREE)/include
-#SSL_LIBS = -L$(SSL_TREE)/lib -lssl -lcrypto
+SSL_DEFS = -DUSE_SSL
+.if ${OPENSSLINC} != "/usr/include"
+SSL_INC = -I${OPENSSLINC}
+.endif
+.if ${OPENSSLLIB} != "/usr/lib"
+SSL_LIBS = -L${OPENSSLLIB}
+.endif
+SSL_LIBS+= -lssl -lcrypto
-BINDIR = /usr/local/sbin
-MANDIR = /usr/local/man
-CC = cc
+BINDIR = ${PREFIX}/sbin
+MANDIR = ${MANPREFIX}/man
+CC ?= cc
CDEFS = $(SSL_DEFS) $(SSL_INC)
-CFLAGS = -O $(CDEFS) -ansi -pedantic -U__STRICT_ANSI__ -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-long-long
-LDFLAGS = -s
+CFLAGS += $(CDEFS) -ansi -pedantic -U__STRICT_ANSI__ -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-long-long
LDLIBS = $(CRYPT_LIB) $(SSL_LIBS) $(SYSV_LIBS)
all: mini_httpd htpasswd
|