Makefile.FreeBSD 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # 3 proxy Makefile for GCC/Unix
  3. #
  4. # You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
  5. # libraries
  6. #
  7. # remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
  8. # library support. Add -DSAFESQL for poorely written ODBC library / drivers.
  9. BUILDDIR = ../bin/
  10. CC ?= gcc
  11. CFLAGS = -c -O -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
  12. COUT = -o
  13. LN ?= ${CC}
  14. LDFLAGS = -pthread -O -fno-strict-aliasing
  15. # -lpthreads may be reuqired on some platforms instead of -pthreads
  16. # -ldl or -lld may be required for some platforms
  17. DCFLAGS = -fPIC
  18. DLFLAGS = -shared
  19. DLSUFFICS = .so
  20. LIBS =
  21. LIBSPREFIX = -l
  22. LIBSSUFFIX =
  23. LNOUT = -o
  24. EXESUFFICS =
  25. OBJSUFFICS = .o
  26. DEFINEOPTION = -D
  27. COMPFILES = *~
  28. REMOVECOMMAND = rm -f
  29. AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
  30. TYPECOMMAND = cat
  31. COMPATLIBS =
  32. MAKEFILE = Makefile.FreeBSD
  33. PLUGINS = StringsPlugin TrafficPlugin PCREPlugin PamAuth TransparentPlugin
  34. include Makefile.inc
  35. install: all
  36. if [ ! -d /usr/local/3proxy/bin ]; then mkdir -p /usr/local/3proxy/bin/; fi
  37. install bin/3proxy /usr/local/3proxy/bin/3proxy
  38. install bin/mycrypt /usr/local/3proxy/bin/mycrypt
  39. install scripts/add3proxyuser.sh /usr/local/3proxy/bin/
  40. if [ -s /usr/local/etc/3proxy/3proxy.cfg ]; then
  41. echo /usr/local/3proxy/3proxy.cfg already exists
  42. else
  43. install scripts/3proxy.cfg /usr/local/etc/3proxy/
  44. if [ ! -d /var/log/3proxy/ ]; then
  45. mkdir /var/log/3proxy/
  46. fi
  47. touch /usr/local/3proxy/passwd
  48. touch /usr/local/3proxy/counters
  49. touch /usr/local/3proxy/bandlimiters
  50. echo Run /usr/local/3proxy/bin/add3proxyuser.sh to add \'admin\' user
  51. fi
  52. allplugins:
  53. @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done