1
0

patch-Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. $Id$
  2. --- mini_httpd-1.19.orig/Makefile 2002-11-01 23:02:57.000000000 +0000
  3. +++ mini_httpd-1.19/Makefile 2007-03-20 13:35:49.000000000 +0000
  4. @@ -14,30 +14,44 @@ CRYPT_LIB = -lcrypt
  5. # http://www.openssl.org/ Make sure the SSL_TREE definition points to the
  6. # tree with your OpenSSL installation - depending on how you installed it,
  7. # it may be in /usr/local instead of /usr/local/ssl.
  8. +
  9. +# OpenSSL
  10. #SSL_TREE = /usr/local/ssl
  11. #SSL_DEFS = -DUSE_SSL
  12. #SSL_INC = -I${SSL_TREE}/include
  13. #SSL_LIBS = -L${SSL_TREE}/lib -lssl -lcrypto
  14. +#SSL_OBJS =
  15. +# MatrixSSL
  16. +#SSL_TREE =
  17. +#SSL_DEFS = -DUSE_SSL -DHAVE_MATRIXSSL
  18. +#SSL_INC =
  19. +#SSL_LIBS = -lmatrixssl
  20. +#SSL_OBJS = matrixssl_helper.o
  21. -BINDIR = /usr/local/sbin
  22. -MANDIR = /usr/local/man
  23. -CC = gcc
  24. +
  25. +DESTDIR =
  26. +
  27. +BINDIR = $(DESTDIR)/usr/sbin
  28. +MANDIR = $(DESTDIR)/usr/share/man
  29. +CC ?= gcc
  30. CDEFS = ${SSL_DEFS} ${SSL_INC}
  31. -CFLAGS = -O ${CDEFS}
  32. -#CFLAGS = -g ${CDEFS}
  33. -LDFLAGS = -s
  34. +CFLAGS += ${CDEFS}
  35. +LDFLAGS ?=
  36. #LDFLAGS = -g
  37. LDLIBS = ${SSL_LIBS} ${SYSV_LIBS} ${CRYPT_LIB}
  38. all: mini_httpd htpasswd
  39. -mini_httpd: mini_httpd.o match.o tdate_parse.o
  40. - ${CC} ${CFLAGS} ${LDFLAGS} mini_httpd.o match.o tdate_parse.o ${LDLIBS} -o mini_httpd
  41. +mini_httpd: mini_httpd.o match.o tdate_parse.o ${SSL_OBJS}
  42. + ${CC} ${CFLAGS} ${LDFLAGS} mini_httpd.o match.o tdate_parse.o ${SSL_OBJS} ${LDLIBS} -o mini_httpd
  43. mini_httpd.o: mini_httpd.c version.h port.h match.h tdate_parse.h mime_encodings.h mime_types.h
  44. ${CC} ${CFLAGS} -c mini_httpd.c
  45. +matrixssl_helper.o: matrixssl_helper.c
  46. + ${CC} ${CFLAGS} -c matrixssl_helper.c
  47. +
  48. match.o: match.c match.h
  49. ${CC} ${CFLAGS} -c match.c
  50. @@ -71,16 +85,18 @@ mini_httpd.pem: mini_httpd.cnf
  51. chmod 600 mini_httpd.pem
  52. -install: all
  53. - rm -f ${BINDIR}/mini_httpd ${BINDIR}/htpasswd
  54. +install: all uninstall
  55. -mkdir -p ${BINDIR}
  56. cp mini_httpd htpasswd ${BINDIR}
  57. - rm -f ${MANDIR}/man8/mini_httpd.8 ${MANDIR}/man1/htpasswd.1
  58. -mkdir -p ${MANDIR}/man8
  59. cp mini_httpd.8 ${MANDIR}/man8
  60. -mkdir -p ${MANDIR}/man1
  61. cp htpasswd.1 ${MANDIR}/man1
  62. +uninstall:
  63. + rm -f ${BINDIR}/mini_httpd ${BINDIR}/htpasswd
  64. + rm -f ${MANDIR}/man8/mini_httpd.8 ${MANDIR}/man1/htpasswd.1
  65. +
  66. clean:
  67. rm -f mini_httpd mime_encodings.h mime_types.h htpasswd mini_httpd.rnd *.o core core.* *.core