1
0

Common.mk 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. LIBNAME = ustl
  2. MAJOR = 0
  3. MINOR = 8
  4. BUILD = 0
  5. CC = $(CROSS)gcc
  6. CXX = $(CROSS)g++
  7. LD = $(CROSS)gcc
  8. AR = $(CROSS)ar
  9. RANLIB = $(CROSS)ranlib
  10. DOXYGEN = echo
  11. INSTALL = install
  12. RM = rm -f
  13. LN = ln -sf
  14. prefix = /usr
  15. exec_prefix = /usr
  16. BINDIR = /usr/bin
  17. INCDIR = /usr/include
  18. LIBDIR = /usr/lib
  19. DESTDIR =
  20. INSTALLDIR = ${INSTALL} -d
  21. INSTALLLIB = ${INSTALL} -p -m 644
  22. INSTALLEXE = ${INSTALL} -p -m 755
  23. INSTALLDATA = ${INSTALL} -p -m 644
  24. CWARNOPTS = -Wall -W -Wpointer-arith -Wno-cast-align \
  25. -Wcast-qual -Wwrite-strings -Wredundant-decls
  26. CXXWARNOPTS = ${CWARNOPTS} -Wconversion -Wsign-promo -Wsynth -Woverloaded-virtual
  27. PROCESSOR_OPTS =
  28. INLINE_OPTS = -finline-limit=65535
  29. CUSTOMINCDIR =
  30. CUSTOMLIBDIR =
  31. BUILD_SHARED = 1
  32. BUILD_STATIC = 1
  33. #DEBUG = 1
  34. #PROFILE = 1
  35. STANDALONE = -nodefaultlibs
  36. CFLAGS = \
  37. ${CUSTOMINCDIR} ${OPTFLAGS} ${CWARNOPTS} ${STANDALONE}
  38. CXXFLAGS = \
  39. ${CUSTOMINCDIR} ${OPTFLAGS} ${INLINE_OPTS} \
  40. ${CXXWARNOPTS} ${STANDALONE} -fno-builtin
  41. LDFLAGS = ${CUSTOMLIBDIR} ${STANDALONE}
  42. OPTFLAGS = ${PROCESSOR_OPTS}
  43. ifdef DEBUG
  44. OPTFLAGS += -O0 -g
  45. else
  46. OPTFLAGS += -O3 -DNDEBUG=1
  47. endif
  48. ifdef PROFILE
  49. OPTFLAGS += -pg
  50. endif
  51. ifdef STANDALONE
  52. LIBS += -lsupc++ -lgcc_eh -lgcc -lc
  53. endif
  54. ifdef BUILD_SHARED
  55. CFLAGS += -fPIC
  56. CXXFLAGS += -fPIC
  57. endif
  58. SHBLDFL = -shared
  59. LIBA = lib${LIBNAME}.a
  60. LIBSO = lib${LIBNAME}.so
  61. ifdef MAJOR
  62. LIBSOLNK = ${LIBSO}.${MAJOR}.${MINOR}
  63. LIBSOBLD = ${LIBSO}.${MAJOR}.${MINOR}.${BUILD}
  64. endif
  65. TOCLEAN += ${LIBSO} ${LIBA} ${LIBSOBLD}