Skip to content

Commit

Permalink
Merge pull request #1237 from lairworks/removeSdl2ConfigUse
Browse files Browse the repository at this point in the history
Update `makefile` to not use `sdl2-config`
  • Loading branch information
DanRStevens authored Feb 21, 2025
2 parents c13660e + a4f656a commit 598b72b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
name: Add Brew include path to system include paths
command: |
echo "export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:$(brew --prefix)/include" >> "${BASH_ENV}"
echo "export LDFLAGS_EXTRA=-L$(brew --prefix)/lib" >> "${BASH_ENV}"
- build-and-test
build-linux-gcc:
docker:
Expand All @@ -50,6 +51,7 @@ jobs:
- image: outpostuniverse/nas2d-mingw:1.11
environment:
WARN_EXTRA: "-Wno-redundant-decls"
LDFLAGS_EXTRA: "-L/usr/local/x86_64-w64-mingw32/lib"
steps:
- checkout
- build-and-test
Expand Down
8 changes: 3 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ Darwin_OpenGL_LIBS := -lGLEW -framework OpenGL
Windows_OpenGL_LIBS := -lglew32 -lopengl32
OpenGL_LIBS := $($(TARGET_OS)_OpenGL_LIBS)

SDL_CONFIG := sdl2-config
SDL_CONFIG_CFLAGS := $(shell type $(SDL_CONFIG) >/dev/null 2>&1 && $(SDL_CONFIG) --cflags)
SDL_CONFIG_LIBS := $(shell type $(SDL_CONFIG) >/dev/null 2>&1 && $(SDL_CONFIG) --libs)
SDL_LIBS := -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2

CPPFLAGS := $(CPPFLAGS_EXTRA)
CXXFLAGS_WARN := -Wall -Wextra -Wpedantic -Wzero-as-null-pointer-constant -Wnull-dereference -Wold-style-cast -Wcast-qual -Wcast-align -Wdouble-promotion -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wmissing-include-dirs -Winvalid-pch -Wmissing-format-attribute -Wredundant-decls -Wformat=2 $(WARN_EXTRA)
CXXFLAGS := $(CXXFLAGS_EXTRA) $(CONFIG_CXX_FLAGS) -std=c++20 $(CXXFLAGS_WARN) $(SDL_CONFIG_CFLAGS)
CXXFLAGS := $(CXXFLAGS_EXTRA) $(CONFIG_CXX_FLAGS) -std=c++20 $(CXXFLAGS_WARN)
LDFLAGS := $(LDFLAGS_EXTRA)
LDLIBS := $(LDLIBS_EXTRA) -lstdc++ -lSDL2_image -lSDL2_mixer -lSDL2_ttf $(SDL_CONFIG_LIBS) $(OpenGL_LIBS)
LDLIBS := $(LDLIBS_EXTRA) -lstdc++ $(SDL_LIBS) $(OpenGL_LIBS)

PROJECT_FLAGS = $(CPPFLAGS) $(CXXFLAGS)

Expand Down

0 comments on commit 598b72b

Please sign in to comment.