Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build pc version on macOS #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile.pc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
HOST_OS := $(shell uname -s)
FREETYPE2_PKG_CONFIG := pkg-config freetype2

ifeq ($(strip $(HOST_OS)),Darwin)
BIN2S_FLAGS := --apple-llvm
FREETYPE2_PKG_CONFIG := freetype-config
endif

ifneq (,$(findstring MINGW,$(HOST_OS)))
Expand All @@ -14,7 +16,7 @@ test : pc_main/main.cpp pc_main/pc_launch.c pc_main/pc_power.c pc_main/pc_netsta
common/menu-entry.c common/menu-list.c common/message-box.c common/text.c \
common/ui.c common/assets.c common/math.c common/theme.c \
common/netloader.c
gcc -Wall -O2 -g -DVERSION=\"v$(APP_VERSION)\" $(EXTRA_CFLAGS) `pkg-config freetype2 --cflags` $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -lpthread `pkg-config freetype2 --libs` -lm -lphysfs -lz -lconfig -lturbojpeg -lpng $(EXTRA_LDFLAGS) -I. -iquote $(DEVKITPRO)/libnx/include -Ibuild_pc -g -o $@
gcc -Wall -O2 -g -DVERSION=\"v$(APP_VERSION)\" $(EXTRA_CFLAGS) `$(FREETYPE2_PKG_CONFIG) --cflags` $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -lpthread `$(FREETYPE2_PKG_CONFIG) --libs` -lm -lphysfs -lz -lconfig -lturbojpeg -lpng $(EXTRA_LDFLAGS) -I. -iquote $(DEVKITPRO)/libnx/include -Ibuild_pc -g -o $@

clean:
rm -rf build_pc/ test test.*
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The following libraries are required to build for PC:
- `libconfig`
- `libjpeg-turbo`
- `libphysfs`
- `sfml`

Building for Switch/PC requires `zip`.

Expand All @@ -29,3 +30,4 @@ Since C11 threads are used, building for the PC may fail if C11 threads are not

* This uses code based on 3DS [new-hbmenu](https://github.com/fincs/new-hbmenu).
* `libjpeg-turbo` is used for handling JPEG icons. This library doesn't support lossless JPEG (likewise for official sw which uses `libjpeg-turbo`).
* `c11threads` is used for implement C11 Threads on Windows and macOS.
Loading