Makefile 891 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. manifests = memcached.manifest
  2. SRCDIR = memcached-master
  3. HOST = $(firstword $(shell ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' -m 1 | cut -d: -f2))
  4. PORT = 8000
  5. CORES = 4
  6. MAXMEM = 256
  7. MAXTHREADS = 16
  8. target = memcached $(manifests)
  9. exec_target = memcached
  10. clean-extra = clean-build
  11. extra_rules = \
  12. -e 's:\$$(HOST):$(HOST):g' \
  13. -e 's:\$$(PORT):$(PORT):g' \
  14. -e 's:\$$(MEMSIZE):$(shell expr $(MAXMEM) + $(MAXMEM))M:g' \
  15. -e 's:\$$(THREADNUM):$(shell expr 2 + $(MAXTHREADS)):g'
  16. level = ../../
  17. include ../../Makefile
  18. master.zip:
  19. wget https://github.com/memcached/memcached/archive/master.zip
  20. $(SRCDIR)/configure: master.zip
  21. unzip master.zip
  22. cd $(SRCDIR) && ./autogen.sh
  23. $(SRCDIR)/memcached: $(SRCDIR)/configure
  24. cd $(SRCDIR) && ./configure
  25. cd $(SRCDIR) && make
  26. memcached: $(SRCDIR)/memcached
  27. cp -f $< $@
  28. clean-build:
  29. rm -rf $(BUILDDIR)
  30. distclean: clean
  31. rm -rf $(SRCDIR)