2018-06-17 03:32:09 +00:00
|
|
|
# This Makefile works for Mac OS X (El Capitan).
|
2015-08-08 13:57:52 +00:00
|
|
|
#
|
2017-10-17 07:05:12 +00:00
|
|
|
# Run "brew install sdl" to install SDL in /usr/local.
|
|
|
|
# Run "brew install sdl_gfx".
|
|
|
|
# Run "brew install sdl_mixer".
|
|
|
|
# Run "brew install sdl_ttf".
|
|
|
|
# Run "make -f Makefile.mac" to build HyperRogue as ./hyper.
|
2015-08-08 13:57:52 +00:00
|
|
|
|
2017-10-29 19:47:18 +00:00
|
|
|
CXXFLAGS += -std=c++11 -march=native -DMAC
|
2017-10-17 07:05:12 +00:00
|
|
|
CXXFLAGS += -W -Wall -Wextra -pedantic
|
2018-06-17 03:32:09 +00:00
|
|
|
CXXFLAGS += -Wno-format-pedantic -Wno-unused-parameter -Wno-missing-field-initializers -Wno-vla-extension
|
2017-10-17 07:05:12 +00:00
|
|
|
CXXFLAGS += -I/usr/local/include
|
2018-06-17 03:32:09 +00:00
|
|
|
CXXFLAGS += ${EXTRA_CXXFLAGS}
|
|
|
|
|
2017-10-17 07:05:12 +00:00
|
|
|
LDFLAGS += -L/usr/local/lib
|
|
|
|
|
2018-06-17 03:32:09 +00:00
|
|
|
OBJS = hyper.o
|
|
|
|
|
|
|
|
ifeq (a,b)
|
|
|
|
# Enable PNG screenshots. Requires "brew install libpng".
|
|
|
|
CXXFLAGS += -DCAP_PNG
|
|
|
|
LDFLAGS += -lpng
|
|
|
|
OBJS += savepng.o
|
|
|
|
else
|
|
|
|
CXXFLAGS += -DCAP_PNG=0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (a,b)
|
|
|
|
# Enable RogueViz.
|
|
|
|
CXXFLAGS += -DCAP_ROGUEVIZ
|
|
|
|
endif
|
|
|
|
|
|
|
|
hyper: $(OBJS)
|
|
|
|
$(CXX) $(CXXFLAGS) $(OBJS) $(LDFLAGS) -lSDL -lSDLMain -lSDL_gfx -lSDL_mixer -lSDL_ttf -framework AppKit -framework OpenGL -o hyper
|
2017-10-17 07:05:12 +00:00
|
|
|
|
|
|
|
hyper.o: *.cpp language-data.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -O2 -c hyper.cpp
|
|
|
|
|
2017-10-29 19:47:18 +00:00
|
|
|
langen: langen.cpp language-??.cpp language-ptbr.cpp
|
2017-10-17 07:05:12 +00:00
|
|
|
$(CXX) $(CXXFLAGS) -O0 -Wno-embedded-directive langen.cpp -o langen
|
|
|
|
|
|
|
|
language-data.cpp: langen
|
|
|
|
./langen > language-data.cpp
|
|
|
|
|
2018-06-17 03:32:09 +00:00
|
|
|
savepng.o: savepng.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -O2 -c savepng.cpp
|
|
|
|
|
2017-10-17 07:05:12 +00:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
2018-06-17 03:32:09 +00:00
|
|
|
rm -f hyper hyper.o langen language-data.cpp savepng.o
|