Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/usr/bin/make -f
  2. # file: plc-utils/Makefile
  3. # Published 2010 by Qualcomm Atheros;
  4. # ====================================================================
  5. # target platform symbols;
  6. # --------------------------------------------------------------------
  7. include make.def
  8. # ====================================================================
  9. # package symbols;
  10. # --------------------------------------------------------------------
  11. PROJECT=open-plc-utils
  12. RELEASE=$(shell basename "${CURDIR}")
  13. LIBRARY=${FTP}/toolkit/${RELEASE}
  14. CDROM=${FTP}/cdrom/${RELEASE}
  15. FOLDERS=ether key mdio mme nvm nodes pib plc ram serial slac tools VisualStudioNET
  16. EXCLUDE=--exclude=.git --exclude=.#* --exclude=*.[0-9][0-9][0-9]
  17. # ====================================================================
  18. # installation targets;
  19. # --------------------------------------------------------------------
  20. .PHONY: all compile compact scripts manuals install uninstall check fresh clean ignore
  21. all compile compact scripts manuals install uninstall check fresh clean ignore:
  22. @for folder in ${FOLDERS}; do ${MAKE} -C $${folder} ${@} || exit 1; done
  23. # ====================================================================
  24. # releasetargets;
  25. # --------------------------------------------------------------------
  26. .PHONY: package library prepare cleanse
  27. debian: clean
  28. dpkg-buildpackage -rfakeroot -uc -us
  29. debian-setup:
  30. apt-get install dpkg-dev debhelper devscripts fakeroot linda
  31. # apt-get install dpkg dpkg-dev debhelper dh-make devscripts quilt
  32. package: archive prepare library mine
  33. prepare:
  34. rm -fr t.* install.* *.err *.log
  35. rm -fr */t.* */install.* */*.err */*.log */*.o */*.[0-9][0-9][0-9]
  36. library:
  37. install -m 6775 -o root -g fae -d ${LIBRARY}
  38. install -m 0555 -o root -g root VisualStudioNET/*.msi ${LIBRARY}
  39. install -m 0555 -o root -g root ../${RELEASE}.tar.* ${LIBRARY}
  40. cp -r VisualStudioNET/Programs/* ${LIBRARY}/programs
  41. crlf -w < CHANGES > ${LIBRARY}/_CHANGES.txt
  42. crlf -w < README > ${LIBRARY}/_README.txt
  43. crlf -w < LICENCES > ${LIBRARY}/_LICENSES.txt
  44. crlf -w < NOTICES > ${LIBRARY}/_NOTICES.txt
  45. ls -la ${LIBRARY}/*.tar.*
  46. ls -la ${LIBRARY}/*.msi
  47. # ====================================================================
  48. # maintain;
  49. # --------------------------------------------------------------------
  50. .PHONY: archive restore
  51. archive: clean
  52. tar ${EXCLUDE} -vzcf ../${RELEASE}.tar.gz -C .. ${RELEASE}
  53. tar ${EXCLUDE} -vjcf ../${RELEASE}.tar.bz2 -C .. ${RELEASE}
  54. restore:
  55. tar -vzxf ../${RELEASE}.tar.gz -C ..