Makefile 807 B

123456789101112131415161718192021222324252627282930
  1. include ../../build/config.mk
  2. include ../../build/gccconfig.mk
  3. UHTTPD_SRC = svn://svn.openwrt.org/openwrt/branches/backfire/package/uhttpd/src
  4. UHTTPD_DIR = uhttpd-src
  5. UHTTPD_PATCHDIR = patches
  6. all: compile
  7. include ../../build/module.mk
  8. $(UHTTPD_DIR)/Makefile:
  9. svn co $(UHTTPD_SRC) $(UHTTPD_DIR)
  10. $(UHTTPD_DIR)/.prepared: $(UHTTPD_DIR)/Makefile
  11. (cd $(UHTTPD_PATCHDIR); ls *.patch | sort > series) || true
  12. [ -f "$(UHTTPD_PATCHDIR)/series" ] && while read patch; do \
  13. patch -d $(UHTTPD_DIR) -p1 < $(UHTTPD_PATCHDIR)/$$patch; \
  14. done < $(UHTTPD_PATCHDIR)/series || true
  15. touch $@
  16. compile: $(UHTTPD_DIR)/.prepared
  17. (cd $(UHTTPD_DIR); $(MAKE) LUA_SUPPORT=0 TLS_SUPPORT=0 CGI_SUPPORT=1)
  18. mkdir -p dist/usr/sbin
  19. cp $(UHTTPD_DIR)/uhttpd dist/usr/sbin
  20. compile-all: compile
  21. clean:
  22. rm -rf $(UHTTPD_DIR)