Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/make -f
  2. # file: classes/Makefile
  3. # ====================================================================
  4. # environment definitions;
  5. # --------------------------------------------------------------------
  6. include ../make.def
  7. # ====================================================================
  8. # symbols;
  9. # --------------------------------------------------------------------
  10. CXXFLAGS+=
  11. LDFLAGS+=
  12. VPATH=../classes
  13. TRASH=*.o *.obj *.exe t t.* *~ *.[0-9][0-9][0-9]
  14. TOOLS=
  15. FILES=*.cpp *.hpp *.h *.sh *.mak Makefile Makefile.*
  16. PAGES=
  17. # ====================================================================
  18. # pseudo targets;
  19. # --------------------------------------------------------------------
  20. all compile: ${TOOLS}
  21. compact: compile
  22. if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi
  23. if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi
  24. library:
  25. install -m ${DIR_PERM} -o 0 -g 0 -d ${BIN}
  26. scripts:
  27. manuals:
  28. if [ ! -d ${MAN} ]; then install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN}; fi
  29. install -m ${MAN_PERM} -o 0 -g 0 ${PAGES} ${MAN}
  30. install: compile library
  31. # install -m ${BIN_PERM} -o 0 -g 0 ${TOOLS} ${BIN}
  32. uninstall:
  33. cd ${BIN}; rm -f ${TOOLS}
  34. clean:
  35. rm -f ${TOOLS} ${TRASH}
  36. check:
  37. ${SHELL} classes.sh
  38. ignore:
  39. echo ${TOOLS} | tr ' ' '\n' > .gitignore
  40. # ====================================================================
  41. # rules;
  42. # --------------------------------------------------------------------
  43. %: %.o
  44. ${CXX} -o ${@} ${^} ${LDFLAGS}
  45. %.o: %.cpp
  46. ${CXX} -c ${<} ${CXXFLAGS}
  47. %.hpp: %.hpp
  48. # ====================================================================
  49. #
  50. # --------------------------------------------------------------------
  51. include ../classes/classes.mak