2018-06-12 21:14:25 +00:00
|
|
|
# This Makefile works for MSYS2 and MinGW-w64.
|
|
|
|
#
|
|
|
|
# You might need to run commands such as "pacman -S mingw-w64-x86_64-SDL"
|
|
|
|
# to install SDL and other required libraries.
|
|
|
|
#
|
|
|
|
# Run "make -f Makefile.mgw" to build HyperRogue as ./hyper.exe.
|
2016-08-26 09:58:03 +00:00
|
|
|
|
2018-06-12 21:14:25 +00:00
|
|
|
CXXFLAGS += -std=c++11 -mwindows -DWINDOWS
|
|
|
|
CXXFLAGS += -D_A_VOLID=8
|
|
|
|
CXXFLAGS += ${EXTRA_CXXFLAGS}
|
2016-08-26 09:58:03 +00:00
|
|
|
|
2018-06-17 03:32:09 +00:00
|
|
|
OBJS = hyper.obj
|
|
|
|
|
|
|
|
ifeq (a,b)
|
|
|
|
# Enable PNG screenshots. Requires libpng.
|
|
|
|
CXXFLAGS += -DCAP_PNG
|
|
|
|
LDFLAGS += -lpng
|
|
|
|
OBJS += savepng.obj
|
|
|
|
else
|
|
|
|
CXXFLAGS += -DCAP_PNG=0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (a,b)
|
|
|
|
# Enable RogueViz.
|
|
|
|
CXXFLAGS += -DCAP_ROGUEVIZ
|
|
|
|
endif
|
|
|
|
|
|
|
|
hyper.exe: $(OBJS) hyper.res
|
|
|
|
$(CXX) $(CXXFLAGS) $(OBJS) hyper.res -lSDL -lSDL_mixer -lopengl32 -lSDL_ttf -lSDL_gfx -lglew32 -o hyper.exe
|
2018-06-12 21:14:25 +00:00
|
|
|
|
|
|
|
hyper.obj: *.cpp language-data.cpp hyper.res
|
|
|
|
$(CXX) $(CXXFLAGS) -O2 -c hyper.cpp -o hyper.obj
|
2015-08-08 13:57:52 +00:00
|
|
|
|
|
|
|
hyper.res: hyper.rc hr-icon.ico
|
|
|
|
windres hyper.rc -O coff -o hyper.res
|
|
|
|
|
2018-06-12 21:14:25 +00:00
|
|
|
langen.exe: langen.cpp language-??.cpp language-ptbr.cpp
|
2018-06-27 05:41:56 +00:00
|
|
|
$(CXX) $(CXXFLAGS) -O0 langen.cpp -o langen
|
2015-08-08 13:57:52 +00:00
|
|
|
|
|
|
|
language-data.cpp: langen.exe
|
|
|
|
./langen.exe > language-data.cpp
|
2018-06-12 21:14:25 +00:00
|
|
|
|
2018-06-17 03:32:09 +00:00
|
|
|
savepng.obj: savepng.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -O2 -c savepng.cpp -o savepng.obj
|
|
|
|
|
2018-06-12 21:14:25 +00:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
2018-06-17 03:32:09 +00:00
|
|
|
rm -f hyper.exe hyper.obj hyper.res langen.exe language-data.cpp savepng.obj
|