mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Switch to more correct way of avoiding C++11 related build errors
- Make upstream build system properly respect CXX/CXXFLAGS - Add missing USES
This commit is contained in:
parent
0069879e37
commit
a8d9d3dcf5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=494293
2 changed files with 24 additions and 8 deletions
|
@ -12,13 +12,11 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}
|
||||||
MAINTAINER= amdmi3@FreeBSD.org
|
MAINTAINER= amdmi3@FreeBSD.org
|
||||||
COMMENT= Navigate a mech through a 3D world and fire at enemies
|
COMMENT= Navigate a mech through a 3D world and fire at enemies
|
||||||
|
|
||||||
USES= compiler gmake openal:al,alut
|
USES= gl gmake openal:al,alut sdl
|
||||||
USE_GL= gl glu
|
USE_GL= gl glu
|
||||||
USE_SDL= sdl
|
USE_SDL= sdl
|
||||||
LLD_UNSAFE= yes
|
LLD_UNSAFE= yes
|
||||||
|
USE_CXXSTD= gnu++98
|
||||||
CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}}
|
|
||||||
CFLAGS_clang= -Wno-c++11-narrowing
|
|
||||||
|
|
||||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
# Automatic searching for source files.
|
# Automatic searching for source files.
|
||||||
# Objects to compile are all sources (cpp) and put the .o below build-dir.
|
# Objects to compile are all sources (cpp) and put the .o below build-dir.
|
||||||
@@ -20,18 +20,17 @@ ifneq (,$(findstring Win,$(OS)))
|
@@ -20,40 +20,38 @@ ifneq (,$(findstring Win,$(OS)))
|
||||||
LIMITER=$(dir \file)
|
LIMITER=$(dir \file)
|
||||||
CFLAGS+= -static-libgcc
|
CFLAGS+= -static-libgcc
|
||||||
else
|
else
|
||||||
|
@ -29,12 +29,30 @@
|
||||||
-CFLAGS += -Wp,-M,-MP,-MT,$@,-MF,dep/$(subst /,-,$@).d
|
-CFLAGS += -Wp,-M,-MP,-MT,$@,-MF,dep/$(subst /,-,$@).d
|
||||||
|
|
||||||
# Print warnings when compiling.
|
# Print warnings when compiling.
|
||||||
CFLAGS += -Wall
|
-CFLAGS += -Wall
|
||||||
@@ -40,7 +39,6 @@ CFLAGS += -Wall
|
+CXXFLAGS += -Wall
|
||||||
CFLAGS += $(INCLUDES)
|
|
||||||
|
# Use the given includepathes.
|
||||||
|
-CFLAGS += $(INCLUDES)
|
||||||
|
+CXXFLAGS += $(INCLUDES)
|
||||||
|
|
||||||
# Optimizations.
|
# Optimizations.
|
||||||
-CFLAGS += -O1 -funroll-loops
|
-CFLAGS += -O1 -funroll-loops
|
||||||
|
|
||||||
# Default makefile Target.
|
# Default makefile Target.
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
|
# For executable we need all sources compiled to objects.
|
||||||
|
$(TARGET): $(OBJECTS)
|
||||||
|
- $(CPP) -o $(TARGET) $(OBJECTS) $(LIBRARIES)
|
||||||
|
+ $(CXX) -o $(TARGET) $(OBJECTS) ${LDFLAGS} $(LIBRARIES)
|
||||||
|
|
||||||
|
# Compile all Source files, creates output directories as necessary.
|
||||||
|
build/%.o: %.cpp
|
||||||
|
$(shell $(MKDIR) build 2>/dev/null)
|
||||||
|
$(shell $(MKDIR) $(dir $@) 2>/dev/null)
|
||||||
|
- $(CPP) $(CFLAGS) -c $< -o $@
|
||||||
|
+ $(CXX) $(CXXFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
# IDE may call makefile with target "build" instead of "all".
|
||||||
|
build: all
|
||||||
|
|
Loading…
Add table
Reference in a new issue