logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

libbulletml-0.0.6-Makefile.patch (3102B)


  1. --- a/Makefile
  2. +++ b/Makefile
  3. @@ -1,10 +1,5 @@
  4. -CC = g++
  5. INCLUDES = -I.
  6. LIBS = tinyxml/tinyxml.o tinyxml/tinyxmlparser.o tinyxml/tinyxmlerror.o
  7. -#CXXFLAGS = -g -W -Wall -ansi -pedantic
  8. -#CXXFLAGS = -pg -g -W -Wall -ansi -pedantic
  9. -CXXFLAGS = -O2 -W -Wall -ansi -pedantic
  10. -CFLAGS = -O2
  11. OBJS = bulletmlparser-tinyxml.o bulletmlparser.o bulletmltree.o calc.o formula-variables.o bulletmlrunner.o bulletmlrunnerimpl.o
  12. all: libbulletml.a
  13. @@ -21,7 +16,7 @@
  14. bison -y calc.yy && mv y.tab.c calc.cpp
  15. $(OBJS): %.o: %.cpp
  16. - $(CC) -c $(CXXFLAGS) $(INCLUDES) $<
  17. + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
  18. doxy:
  19. doxygen
  20. --- a/tinyxml/Makefile
  21. +++ b/tinyxml/Makefile
  22. @@ -14,41 +14,6 @@
  23. PROFILE := NO
  24. #****************************************************************************
  25. -
  26. -CC := gcc
  27. -CXX := g++
  28. -LD := g++
  29. -AR := ar rc
  30. -RANLIB := ranlib
  31. -
  32. -DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -g -DDEBUG
  33. -RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O2
  34. -
  35. -LIBS :=
  36. -
  37. -DEBUG_CXXFLAGS := ${DEBUG_CFLAGS}
  38. -RELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
  39. -
  40. -DEBUG_LDFLAGS := -g
  41. -RELEASE_LDFLAGS :=
  42. -
  43. -ifeq (YES, ${DEBUG})
  44. - CFLAGS += ${DEBUG_CFLAGS}
  45. - CXXFLAGS += ${DEBUG_CXXFLAGS}
  46. - LDFLAGS += ${DEBUG_LDFLAGS}
  47. -else
  48. - CFLAGS += ${RELEASE_CFLAGS}
  49. - CXXFLAGS += ${RELEASE_CXXFLAGS}
  50. - LDFLAGS += ${RELEASE_LDFLAGS}
  51. -endif
  52. -
  53. -ifeq (YES, ${PROFILE})
  54. - CFLAGS := ${CFLAGS} -pg
  55. - CXXFLAGS := ${CXXFLAGS} -pg
  56. - LDFLAGS := ${LDFLAGS} -pg
  57. -endif
  58. -
  59. -#****************************************************************************
  60. # Preprocessor directives
  61. #****************************************************************************
  62. @@ -70,8 +35,8 @@
  63. # Makefile code common to all platforms
  64. #****************************************************************************
  65. -CFLAGS := ${CFLAGS} ${DEFS}
  66. -CXXFLAGS := ${CXXFLAGS} ${DEFS}
  67. +CFLAGS += ${DEFS}
  68. +CXXFLAGS += ${DEFS}
  69. #****************************************************************************
  70. # Targets of the build
  71. @@ -98,7 +63,7 @@
  72. #****************************************************************************
  73. ${OUTPUT}: ${OBJS}
  74. - ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
  75. + ${CXX} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} ${EXTRA_LIBS}
  76. #****************************************************************************
  77. # common rules
  78. @@ -106,10 +71,10 @@
  79. # Rules for compiling source files to object files
  80. %.o : %.cpp
  81. - ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
  82. + ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@
  83. %.o : %.c
  84. - ${CC} -c ${CFLAGS} ${INCS} $< -o $@
  85. + ${CC} ${CFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@
  86. clean:
  87. -rm -f core ${OBJS} ${OUTPUT}
  88. --- a/ygg/Makefile
  89. +++ b/ygg/Makefile
  90. @@ -2,8 +2,6 @@
  91. LIBS =
  92. #CXXFLAGS = -g -W -Wall
  93. #CXXFLAGS = -pg -g -W -Wall
  94. -CXXFLAGS = -O2 -W -Wall
  95. -CFLAGS = -O2
  96. OBJS = ygg.o
  97. all: $(OBJS)
  98. @@ -12,7 +10,7 @@
  99. rm -f *.o *.a
  100. $(OBJS): %.o: %.cpp
  101. - $(CXX) -c $(CXXFLAGS) $(INCLUDES) $<
  102. + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
  103. distdir: