Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. include Rules.make
  2. VERTITLE := $(TITLE)-$(VERSION)
  3. SUBDIRS :=
  4. DATE := $(shell date +'%Y%m%d')
  5. ARCHIVE := "$(TITLE)-$(DATE).tar.bz2"
  6. RELEASE := "$(VERTITLE).tar.bz2"
  7. all:
  8. @for dir in $(SUBDIRS); do \
  9. $(MAKE) -C $$dir $(@) || exit 1; \
  10. done;
  11. clean:
  12. $(RM) *.spec *.tar.bz2
  13. rm -f $(SCRIPTS_DIR)/$(TITLE)-config
  14. @for dir in $(SUBDIRS); do \
  15. $(MAKE) -C $$dir $(@) || exit 1; \
  16. done;
  17. install: all
  18. @for dir in $(SUBDIRS); do \
  19. $(MAKE) -C $$dir install || exit 1; \
  20. done;
  21. # Install scripts and other stuff
  22. install -d $(INSTALL_SBIN_DIR)
  23. install -m 0755 $(SCRIPTS_DIR)/rfa $(INSTALL_SBIN_DIR)
  24. # Install configs
  25. install -d $(INSTALL_CONF_DIR)
  26. test -e $(INSTALL_CONF_DIR)/rfa.conf || install -m 0644 $(CONF_DIR)/rfa.conf $(INSTALL_CONF_DIR)
  27. archive: clean
  28. ln -sf ./ $(VERTITLE)
  29. tar -cj --exclude $(VERTITLE)/$(VERTITLE) --exclude .svn --exclude CVS --exclude $(ARCHIVE) -f $(ARCHIVE) $(VERTITLE)/*
  30. $(RM) $(VERTITLE)
  31. release: archive
  32. mv -f $(ARCHIVE) $(RELEASE)
  33. .PHONY: all clean libs utils tests install po archive