summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose dos Santos Junior <j.s.junior@live.com>2018-12-12 05:19:14 +0000
committerDmitry Bogatov <KAction@debian.org>2018-12-12 05:19:14 +0000
commit55d0e75a7081b1a9a6a576ca90400c7d3e3e3bb6 (patch)
tree4d9492b951b9661f9c9f539d28418964a972ef6d
parent996b63f50d183de87b220aa756515e7196c98565 (diff)
Change DESTDIR and LCFLAGS
Autor: Jose dos Santos Junior <j.s.junior@live.com> Last-Update: 2015-09-05 =================================================================== Gbp-Pq: Name fix-makefile
-rw-r--r--Makefile15
1 files changed, 6 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 79c5e81..7e85ad2 100644
--- a/Makefile
+++ b/Makefile
@@ -19,22 +19,21 @@ CRYPT_LIB = -lcrypt
#SSL_INC = -I$(SSL_TREE)/include
#SSL_LIBS = -L$(SSL_TREE)/lib -lssl -lcrypto
-
-BINDIR = /usr/local/sbin
-MANDIR = /usr/local/man
+BINDIR =$(DESTDIR)/usr/sbin
+MANDIR =$(DESTDIR)/usr/share/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+=-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 `dpkg-buildflags --get CPPFLAGS` `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get LDFLAGS` -DUSE_SSL
LDLIBS = $(CRYPT_LIB) $(SSL_LIBS) $(SYSV_LIBS)
all: mini_httpd htpasswd
mini_httpd: mini_httpd.o match.o tdate_parse.o
- $(CC) $(LDFLAGS) mini_httpd.o match.o tdate_parse.o $(LDLIBS) -o mini_httpd
+ $(CC) $(LDFLAGS) mini_httpd.o match.o tdate_parse.o $(LDLIBS) -o mini_httpd -lssl -lcrypto
mini_httpd.o: mini_httpd.c version.h port.h match.h tdate_parse.h mime_encodings.h mime_types.h
- $(CC) $(CFLAGS) -c mini_httpd.c
+ $(CC) $(LDFLAGS) -c mini_httpd.c
match.o: match.c match.h
$(CC) $(CFLAGS) -c match.c
@@ -76,8 +75,6 @@ install: all
rm -f $(MANDIR)/man8/mini_httpd.8 $(MANDIR)/man1/htpasswd.1
-mkdir -p $(MANDIR)/man8
cp mini_httpd.8 $(MANDIR)/man8
- -mkdir -p $(MANDIR)/man1
- cp htpasswd.1 $(MANDIR)/man1
clean:
rm -f mini_httpd mime_encodings.h mime_types.h htpasswd mini_httpd.rnd *.o core core.* *.core