Skip to content

Commit 210c974

Browse files
committed
Add webOS cross-compilation support, make openmp optional
1 parent 0bb7b86 commit 210c974

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

bsnes/GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
target ?= bsnes
22
binary ?= application
33
build := performance
4-
openmp := true
4+
openmp ?= true
55
local := false
66
flags += -I. -I..
77

bsnes/target-libretro/GNUmakefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
name := bsnes_libretro
22
local := false
3-
openmp := true
3+
openmp ?= true
44
flags += -Wno-narrowing -Wno-multichar -g -fPIC
55

6+
ifeq ($(openmp),true)
7+
openmp_libs := -lgomp
8+
else
9+
openmp_libs :=
10+
endif
11+
612
ifeq ($(platform), ios-arm64)
713
flags += -fPIC -miphoneos-version-min=11.0 -Wno-error=implicit-function-declaration -DHAVE_POSIX_MEMALIGN
814
options += -dynamiclib
@@ -22,10 +28,10 @@ objects := $(patsubst %,obj/%.o,$(objects))
2228
obj/libretro.o: target-libretro/libretro.cpp
2329

2430
all: $(objects)
25-
ifeq ($(platform),linux)
26-
$(strip $(compiler) -o out/bsnes_hd_beta_libretro.so -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T -lgomp -Wl,-Bdynamic $(options))
31+
ifneq ($(filter $(platform),linux unix),)
32+
$(strip $(compiler) -o out/bsnes_hd_beta_libretro.so -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T $(openmp_libs) -Wl,-Bdynamic $(options))
2733
else ifeq ($(platform),windows)
28-
$(strip $(compiler) -o out/bsnes_hd_beta_libretro.dll -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T -lgomp -Wl,-Bdynamic $(options))
34+
$(strip $(compiler) -o out/bsnes_hd_beta_libretro.dll -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T $(openmp_libs) -Wl,-Bdynamic $(options))
2935
else ifeq ($(platform),libnx)
3036
$(strip $(AR) rcs out/bsnes_hd_beta_libretro_libnx.a $(objects))
3137
else ifeq ($(platform),macos)

nall/GNUmakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ ifeq ($(compiler),)
8383
endif
8484
endif
8585
86+
# cross compilation
87+
ifneq (,$(findstring webos,$(CROSS_COMPILE)))
88+
openmp = false
89+
endif
90+
8691
# build optimization levels
8792
ifeq ($(build),debug)
8893
flags += -Og -g -DBUILD_DEBUG

0 commit comments

Comments
 (0)