commit: c04d1edefb831ddb5054d427efb92a755238ce24
parent b2b7e3e4f4151c6e8d3562b87b470ecba8e8f18e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 22 Mar 2024 19:32:15 +0100
Apply gentoo libbulletml-0.0.6-Makefile.patch
Diffstat:
3 files changed, 7 insertions(+), 49 deletions(-)
diff --git a/src/Makefile b/src/Makefile
@@ -1,10 +1,5 @@
-CC = g++
INCLUDES = -I.
LIBS = tinyxml/tinyxml.o tinyxml/tinyxmlparser.o tinyxml/tinyxmlerror.o
-#CXXFLAGS = -g -W -Wall -ansi -pedantic
-#CXXFLAGS = -pg -g -W -Wall -ansi -pedantic
-CXXFLAGS = -O2 -W -Wall -ansi -pedantic
-CFLAGS = -O2
OBJS = bulletmlparser-tinyxml.o bulletmlparser.o bulletmltree.o calc.o formula-variables.o bulletmlrunner.o bulletmlrunnerimpl.o
all: libbulletml.a
@@ -21,7 +16,7 @@ calc.cpp: calc.yy
bison -y calc.yy && mv y.tab.c calc.cpp
$(OBJS): %.o: %.cpp
- $(CC) -c $(CXXFLAGS) $(INCLUDES) $<
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
doxy:
doxygen
diff --git a/src/tinyxml/Makefile b/src/tinyxml/Makefile
@@ -14,41 +14,6 @@ DEBUG := NO
PROFILE := NO
#****************************************************************************
-
-CC := gcc
-CXX := g++
-LD := g++
-AR := ar rc
-RANLIB := ranlib
-
-DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -g -DDEBUG
-RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O2
-
-LIBS :=
-
-DEBUG_CXXFLAGS := ${DEBUG_CFLAGS}
-RELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
-
-DEBUG_LDFLAGS := -g
-RELEASE_LDFLAGS :=
-
-ifeq (YES, ${DEBUG})
- CFLAGS += ${DEBUG_CFLAGS}
- CXXFLAGS += ${DEBUG_CXXFLAGS}
- LDFLAGS += ${DEBUG_LDFLAGS}
-else
- CFLAGS += ${RELEASE_CFLAGS}
- CXXFLAGS += ${RELEASE_CXXFLAGS}
- LDFLAGS += ${RELEASE_LDFLAGS}
-endif
-
-ifeq (YES, ${PROFILE})
- CFLAGS := ${CFLAGS} -pg
- CXXFLAGS := ${CXXFLAGS} -pg
- LDFLAGS := ${LDFLAGS} -pg
-endif
-
-#****************************************************************************
# Preprocessor directives
#****************************************************************************
@@ -70,8 +35,8 @@ INCS :=
# Makefile code common to all platforms
#****************************************************************************
-CFLAGS := ${CFLAGS} ${DEFS}
-CXXFLAGS := ${CXXFLAGS} ${DEFS}
+CFLAGS += ${DEFS}
+CXXFLAGS += ${DEFS}
#****************************************************************************
# Targets of the build
@@ -98,7 +63,7 @@ OBJS := $(addsuffix .o,$(basename ${SRCS}))
#****************************************************************************
${OUTPUT}: ${OBJS}
- ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
+ ${CXX} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} ${EXTRA_LIBS}
#****************************************************************************
# common rules
@@ -106,10 +71,10 @@ ${OUTPUT}: ${OBJS}
# Rules for compiling source files to object files
%.o : %.cpp
- ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@
%.o : %.c
- ${CC} -c ${CFLAGS} ${INCS} $< -o $@
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@
clean:
-rm -f core ${OBJS} ${OUTPUT}
diff --git a/src/ygg/Makefile b/src/ygg/Makefile
@@ -2,8 +2,6 @@ INCLUDES = -I../std -I..
LIBS =
#CXXFLAGS = -g -W -Wall
#CXXFLAGS = -pg -g -W -Wall
-CXXFLAGS = -O2 -W -Wall
-CFLAGS = -O2
OBJS = ygg.o
all: $(OBJS)
@@ -12,7 +10,7 @@ clean:
rm -f *.o *.a
$(OBJS): %.o: %.cpp
- $(CXX) -c $(CXXFLAGS) $(INCLUDES) $<
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
distdir: