Skip to content

Commit 100b5d1

Browse files
committed
Fix Linux build
1 parent ccc8af9 commit 100b5d1

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install FLTK
2828
working-directory: lib/fltk
2929
run: |
30-
cmake -D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" -D CMAKE_BUILD_TYPE=Release -D FLTK_GRAPHICS_CAIRO=1 -D FLTK_BACKEND_WAYLAND=0
30+
cmake -D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" -D CMAKE_BUILD_TYPE=Release -D FLTK_GRAPHICS_CAIRO=1 -D FLTK_BACKEND_WAYLAND=0 -D FLTK_USE_SYSTEM_LIBPNG=0 -D FLTK_USE_SYSTEM_ZLIB=0
3131
make
3232
make install
3333

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ cd polished-map
7070
# Build FLTK 1.4.0
7171
git clone --branch release-1.4.0rc1 --depth 1 https://github.com/fltk/fltk.git lib/fltk
7272
pushd lib/fltk
73-
cmake -D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" -D CMAKE_BUILD_TYPE=Release -D FLTK_GRAPHICS_CAIRO=1 -D FLTK_BACKEND_WAYLAND=0
73+
cmake -D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" -D CMAKE_BUILD_TYPE=Release -D FLTK_GRAPHICS_CAIRO=1 -D FLTK_BACKEND_WAYLAND=0 -D FLTK_USE_SYSTEM_LIBPNG=0 -D FLTK_USE_SYSTEM_ZLIB=0
7474
make
7575
make install
7676
popd

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ bindir = bin
1616

1717
fltk-config = $(bindir)/fltk-config
1818

19-
CXXFLAGS = -std=c++17 -I$(srcdir) -I$(resdir) $(shell $(fltk-config) --use-images --cxxflags)
20-
LDFLAGS = $(shell $(fltk-config) --use-images --ldflags) $(shell pkg-config --libs libpng xpm)
19+
CXXFLAGS := -std=c++17 -I$(srcdir) -I$(resdir) $(shell $(fltk-config) --use-images --cxxflags) $(CXXFLAGS)
20+
LDFLAGS := $(shell $(fltk-config) --use-images --ldstaticflags) $(shell pkg-config --libs xpm) $(LDFLAGS)
2121

22-
RELEASEFLAGS = -DNDEBUG -O3 -flto -march=native
22+
RELEASEFLAGS = -DNDEBUG -O3 -flto
2323
DEBUGFLAGS = -DDEBUG -D_DEBUG -O0 -g -ggdb3 -Wall -Wextra -pedantic -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter
2424

25-
COMMON = $(wildcard $(srcdir)/*.h) $(wildcard $(resdir)/*.xpm)
25+
COMMON = $(wildcard $(srcdir)/*.h) $(wildcard $(resdir)/*.xpm) $(resdir)/help.html
2626
SOURCES = $(wildcard $(srcdir)/*.cpp)
2727
OBJECTS = $(SOURCES:$(srcdir)/%.cpp=$(tmpdir)/%.o)
2828
DEBUGOBJECTS = $(SOURCES:$(srcdir)/%.cpp=$(debugdir)/%.o)
@@ -39,19 +39,19 @@ all: $(polishedmap)
3939
$(polishedmap): release
4040
$(polishedmapd): debug
4141

42-
release: CXXFLAGS += $(RELEASEFLAGS)
42+
release: CXXFLAGS := $(RELEASEFLAGS) $(CXXFLAGS)
4343
release: $(TARGET)
4444

45-
debug: CXXFLAGS += $(DEBUGFLAGS)
45+
debug: CXXFLAGS := $(DEBUGFLAGS) $(CXXFLAGS)
4646
debug: $(DEBUGTARGET)
4747

4848
$(TARGET): $(OBJECTS)
4949
@mkdir -p $(@D)
50-
$(LD) -o $@ $^ $(LDFLAGS)
50+
$(LD) -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
5151

5252
$(DEBUGTARGET): $(DEBUGOBJECTS)
5353
@mkdir -p $(@D)
54-
$(LD) -o $@ $^ $(LDFLAGS)
54+
$(LD) -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
5555

5656
$(tmpdir)/%.o: $(srcdir)/%.cpp $(COMMON)
5757
@mkdir -p $(@D)

src/block-window.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void Block_Window::metatile(const Metatile *mt, bool has_collisions, bool bin_co
207207
cin->activate();
208208
}
209209
else {
210-
cin->value(NULL);
210+
cin->value(nullptr);
211211
cin->deactivate();
212212
}
213213
cin->insert_position(0);

0 commit comments

Comments
 (0)