Skip to content

Commit

Permalink
Makefile: simplify and use pkg-config for SDL2
Browse files Browse the repository at this point in the history
This allows for improved cross-platform building. Tested working on
Windows 10 in a MinGW64 (w64devkit) development environment with the
following commit.

Signed-off-by: Mahyar Koshkouei <[email protected]>
  • Loading branch information
deltabeard committed Feb 12, 2024
1 parent 0434c76 commit c1b785a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
pokegb: pokegb.cc
$(CC) -O2 -Wall -Wno-return-type -Wno-misleading-indentation -Wno-parentheses -o $@ $< -lSDL2
CXXFLAGS := -Os -s -Wall -Wno-return-type -Wno-misleading-indentation -Wno-parentheses
override CXXFLAGS += $(shell pkg-config sdl2 --cflags)
override LDLIBS += $(shell pkg-config sdl2 --libs)

all: pokegb deobfuscated

rom.sav: empty.sav
cp $< $@

clean:
rm -f pokegb rom.sav
$(RM) pokegb rom.sav

0 comments on commit c1b785a

Please sign in to comment.