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

Updates from upstream #1

Open
wants to merge 573 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
573 commits
Select commit Hold shift + click to select a range
bd98054
Minor fixes
Namaneo Jan 8, 2023
808d55c
Few performance improvements
Namaneo Jan 9, 2023
1428dc4
Improve fast forward
Namaneo Jan 10, 2023
723c7f1
Fix makefile
Namaneo Jan 10, 2023
b79f1e7
Fix fast forward
Namaneo Jan 10, 2023
be00ee1
Fix crackling audio when fast forwarding
Namaneo Jan 11, 2023
3ddec8b
Improve audio
Namaneo Jan 12, 2023
14a0086
Improve audio
Namaneo Jan 12, 2023
c42f075
Let's try that
Namaneo Jan 12, 2023
c407d94
Remove the flush
Namaneo Jan 12, 2023
8339028
Attempt to fix audio delay
Namaneo Jan 15, 2023
7540c31
A bit better... I guess?
Namaneo Jan 18, 2023
660a3fd
Remove baddly implemented framerate regulator
Namaneo Feb 1, 2023
1e857af
Is audio synced now?
Namaneo Feb 2, 2023
fdd14f3
Circular buffer for the audio (WIP)
Namaneo Feb 4, 2023
dd4f9b7
Use main and SDL_Delay
Namaneo Feb 5, 2023
1f7eebe
Moved to esbuild
Namaneo Feb 6, 2023
34e61d7
Cleanup
Namaneo Feb 6, 2023
3fc618d
Accurate FPS + audio improvement
Namaneo Feb 6, 2023
9821170
Audio fix
Namaneo Feb 6, 2023
3403958
Skip draw during fast forward
Namaneo Feb 6, 2023
e7b30d6
switch to http-server in Dockerfile
Namaneo Feb 6, 2023
a935f98
Audio is a bit better
Namaneo Feb 7, 2023
5633817
Just trying
Namaneo Feb 7, 2023
3a9a1c8
Mostly cleanup
Namaneo Feb 7, 2023
907c324
Yet another audio update...
Namaneo Feb 7, 2023
0497cde
Framerate inside JUN_Core
Namaneo Feb 8, 2023
0118bda
Bye bye interop
Namaneo Feb 9, 2023
9ca7b73
Sync filesystem to IndexedDB
Namaneo Feb 9, 2023
0b9a05b
No ASYNCIFY anymore
Namaneo Feb 9, 2023
656a819
Quick cleanup
Namaneo Feb 10, 2023
48f8ccd
Woops
Namaneo Feb 10, 2023
dd21a4d
Add tools to replace some SDL usage
Namaneo Feb 17, 2023
8c98e73
Few defines for reference
Namaneo Feb 17, 2023
508032d
Fixed some issues
Namaneo Feb 19, 2023
0df4e32
Image format conversion
Namaneo Feb 19, 2023
ffecc14
Massive changes, too long to explain...
Namaneo Mar 30, 2023
7ecf34a
Full Joypad and Touch support
Namaneo Mar 31, 2023
a57260c
Better settings management
Namaneo Apr 2, 2023
3a45ed3
Remove obsolete stuff
Namaneo Apr 2, 2023
6f32329
Junie settings are saved per core
Namaneo Apr 2, 2023
168d9a2
Touch fixes
Namaneo Apr 3, 2023
9b791ce
Minor fix
Namaneo Apr 3, 2023
2478eff
A bunch of things... again.
Namaneo Apr 3, 2023
40f4f22
Remove assets
Namaneo Apr 4, 2023
001c391
Remove tools, memory management improvement
Namaneo Apr 4, 2023
0de02b6
Huge storage improvement
Namaneo Apr 5, 2023
5303c05
Fix saves backup
Namaneo Apr 5, 2023
9079133
A bunch a fixes
Namaneo Apr 6, 2023
59f7570
Cleanup
Namaneo Apr 6, 2023
abd48c4
Styling
Namaneo Apr 6, 2023
93a0682
Add Gambatte
Namaneo Apr 6, 2023
ac4bb71
Switched to VBA-M
Namaneo Apr 6, 2023
6eba6dc
Update README
Namaneo Apr 6, 2023
d5f2935
Order
Namaneo Apr 6, 2023
c02e1bd
A bit of css
Namaneo Apr 6, 2023
19e55e5
Revert small bit
Namaneo Apr 6, 2023
738d183
Order
Namaneo Apr 6, 2023
797b915
class to className
Namaneo Apr 6, 2023
9c81209
Modal fix
Namaneo Apr 7, 2023
b0faf56
Few core improvements
Namaneo Apr 9, 2023
22e8536
Switched to DeSmuME
Namaneo Apr 9, 2023
bfbcc64
Improve canvas resize
Namaneo Apr 10, 2023
3119e25
Load big NDS files on iOS (... sometimes)
Namaneo Apr 10, 2023
9331c36
Now it should load consistently
Namaneo Apr 10, 2023
8a5ca95
I mean, NOW it should load consistently
Namaneo Apr 10, 2023
0c38f4a
Download progress
Namaneo Apr 10, 2023
8a6a0bb
Q&D lock of some variables
Namaneo Apr 11, 2023
54f0994
A bunch of updates
Namaneo Apr 12, 2023
4f5bb2f
Another bunch of happiness
Namaneo Apr 13, 2023
f97538f
Core is running in a worker
Namaneo Apr 15, 2023
5ff6a2e
service worker update
Namaneo Apr 15, 2023
e5380dc
Rendering with WebGL
Namaneo Apr 16, 2023
05c4759
WebGL2 and improved startup performance
Namaneo Apr 16, 2023
0f093b7
Improve initial library load
Namaneo Apr 16, 2023
e3ecd37
Fix files sync
Namaneo Apr 16, 2023
f7771ca
Small fix
Namaneo Apr 16, 2023
dad4c33
Cleanup
Namaneo Apr 16, 2023
5757bfc
Fix refresh
Namaneo Apr 16, 2023
938adc4
Moved rendering back to the main thread
Namaneo Apr 16, 2023
1f09559
A bit more WASM memory
Namaneo Apr 16, 2023
3a22930
Dedicated class for paths
Namaneo Apr 16, 2023
4fa464a
Service worker auto update
Namaneo Apr 16, 2023
d61b413
Improved rom import
Namaneo Apr 17, 2023
54eddb9
Mostly documentation, also:
Namaneo Apr 17, 2023
5ff4545
More documentation
Namaneo Apr 17, 2023
43b07ca
Cleanup saves backup and restore
Namaneo Apr 17, 2023
6a38278
Another documentation pass
Namaneo Apr 17, 2023
efa17d8
Modal improvements + docmentation
Namaneo Apr 18, 2023
e5d8b55
Better content layout
Namaneo Apr 18, 2023
73e60b1
Core and Games as modals
Namaneo Apr 18, 2023
a259cd6
Core page improvement
Namaneo Apr 18, 2023
31fdc76
So much in there...
Namaneo Apr 21, 2023
5b48c37
Delay pointer position compute
Namaneo Apr 22, 2023
175a9d3
Update README.md
Namaneo Apr 22, 2023
8a6616d
Mostly the cleanup before the release... Maybe.
Namaneo Apr 24, 2023
3d8d45b
Cleanup
Namaneo May 18, 2023
5b06f84
Remove all covers
Namaneo Jun 20, 2023
eb47520
Small css fix
Namaneo Jun 20, 2023
009ef5e
Improved a bit the UI
Namaneo Jun 26, 2023
573a58c
Missing link flag
Namaneo Jun 30, 2023
65632cf
Switch branch in workflow
Namaneo Jun 30, 2023
1f41a9e
New FS, NDS broken, no files save/restore
Namaneo Aug 4, 2023
4db08d3
Fix NDS and files backup
Namaneo Aug 5, 2023
560103e
Test
Namaneo Aug 5, 2023
79e2096
Remove Playwright
Namaneo Aug 5, 2023
51a20c8
Clean Dockerfile
Namaneo Aug 5, 2023
1741947
Improve Parallel return values
Namaneo Aug 5, 2023
ecc36a0
Multiple small improvements
Namaneo Aug 6, 2023
b4afeeb
Big cleanup (only one filesystem)
Namaneo Aug 7, 2023
0c5e0cf
Parallel everywhere!
Namaneo Aug 7, 2023
b8b551b
Debug
Namaneo Aug 7, 2023
f067a10
Revert
Namaneo Aug 7, 2023
bc14f35
Fix worker
Namaneo Aug 7, 2023
35a269d
Really fix worker
Namaneo Aug 7, 2023
5c31ade
Huge cleanup, draw directly the frames
Namaneo Aug 8, 2023
86ce050
Re-use SAB in Parallel
Namaneo Aug 8, 2023
16c001f
Small cleanup, fixes Parallel concurrency issue
Namaneo Aug 8, 2023
2a85040
Cleanup
Namaneo Aug 8, 2023
4945d42
Cleanup
Namaneo Aug 8, 2023
0c8153a
Reduce core worker calls
Namaneo Aug 8, 2023
0af6de6
Safety over save states
Namaneo Aug 8, 2023
8a99a83
Trying SIMd128
Namaneo Aug 8, 2023
0431fae
Improve controls
Namaneo Aug 9, 2023
71ec39c
Fix controller color
Namaneo Aug 9, 2023
53b9838
Another color fix
Namaneo Aug 9, 2023
619d717
Variables improvement
Namaneo Aug 9, 2023
f9fe90c
Restore old database files
Namaneo Aug 9, 2023
1651888
Add 2048
Namaneo Aug 10, 2023
4f125c5
More precise gamepad (hopefully)
Namaneo Aug 10, 2023
625e5ae
Experiment touch gestures for 2048
Namaneo Aug 10, 2023
d63ffc1
Revert 2048 touch stuff
Namaneo Aug 10, 2023
2673851
Missing events
Namaneo Aug 10, 2023
cd30867
Add precompiled libraries
Namaneo Aug 10, 2023
b4f862a
Makefiles adjustements
Namaneo Aug 10, 2023
7cf6558
Let's try that
Namaneo Aug 10, 2023
1d9d633
Cleanup gamepad touch
Namaneo Aug 11, 2023
e3729da
Fix touch
Namaneo Aug 11, 2023
041f530
Woops
Namaneo Aug 11, 2023
2ce1152
Fix makefile
Namaneo Aug 11, 2023
ccfec59
Try audio fix
Namaneo Aug 11, 2023
0cb1ae8
Or try that?
Namaneo Aug 11, 2023
ac80bb3
Or that?
Namaneo Aug 11, 2023
561ae5a
Or maybe that?
Namaneo Aug 11, 2023
8feb875
Eheh
Namaneo Aug 11, 2023
861fc8e
Another try...
Namaneo Aug 11, 2023
06b4987
Just a few fixes
Namaneo Aug 15, 2023
55e4b61
Optimized the filesystem a little bit
Namaneo Aug 16, 2023
35f740d
Woops
Namaneo Aug 17, 2023
a388d0d
Fix saves; Use upstream desmume
Namaneo Aug 17, 2023
1c9b211
Read and wrtie game file from worker
Namaneo Aug 20, 2023
22b861c
Dirty fix threads
Namaneo Aug 20, 2023
e37e0ad
Preopens improvement
Namaneo Aug 21, 2023
71c68d0
Build against emscripten headers
Namaneo Aug 22, 2023
e3b24a7
Emscripten in deps
Namaneo Aug 22, 2023
d26ce2a
WASI_SDK in deps
Namaneo Aug 22, 2023
860acff
Improve a bit file loading
Namaneo Aug 22, 2023
42a9c79
Only load game file
Namaneo Aug 23, 2023
5f5783a
Gamepad should be better
Namaneo Aug 24, 2023
dc7f5c2
Prevent mobile defaults
Namaneo Aug 25, 2023
bf58ddd
Tiny fix
Namaneo Aug 26, 2023
876e667
UI rework
Namaneo Aug 26, 2023
2adaa2f
Add 2048 back
Namaneo Aug 26, 2023
4d79eaa
Woops
Namaneo Aug 26, 2023
01fb39b
Small UI improvement
Namaneo Aug 26, 2023
f28538a
Cleanup
Namaneo Aug 26, 2023
82c7c9c
Another cleanup
Namaneo Aug 26, 2023
e5ab2f5
UI fix
Namaneo Aug 26, 2023
55aaca3
Cleanup
Namaneo Aug 26, 2023
8aafdef
Update .gitignore
Namaneo Aug 27, 2023
071aae3
Cleanup how cores are built
Namaneo Aug 28, 2023
55323c2
WASM renaming
Namaneo Aug 28, 2023
25a1936
Experimental support for PCSX
Namaneo Aug 28, 2023
d5c5cc5
Improve aspect ratio handling
Namaneo Aug 28, 2023
74a0119
Experimental support for N64
Namaneo Aug 28, 2023
5f70201
Woops
Namaneo Aug 28, 2023
b22981c
Fix ratio sometimes being 0
Namaneo Aug 28, 2023
843ecfa
Aspect ratio fix
Namaneo Aug 29, 2023
e94d30a
Fix threads and aspect ratio
Namaneo Aug 29, 2023
895a533
Extract graphics into a service
Namaneo Aug 29, 2023
c0c681a
Massic UI cleanup...
Namaneo Aug 29, 2023
168649d
A few optimizations
Namaneo Aug 30, 2023
b3d2a82
Rendering offscreen
Namaneo Aug 30, 2023
860f526
Move back graphics to the main thread
Namaneo Aug 30, 2023
128f8a6
Improve local games install
Namaneo Aug 30, 2023
c449f3c
Memory footprint improvement
Namaneo Aug 30, 2023
fc83470
Refactoring
Namaneo Aug 30, 2023
bdebe92
Better error management
Namaneo Aug 30, 2023
463b7b6
Increase buffer size
Namaneo Aug 30, 2023
7c28209
Improve games install
Namaneo Aug 30, 2023
c52b3c0
Accurately respect core FPS
Namaneo Aug 31, 2023
f33dbf7
Test
Namaneo Aug 31, 2023
0350a53
Fix docker build
Namaneo Aug 31, 2023
38a69cf
Improve synchronization
Namaneo Aug 31, 2023
d800994
Mostly cleanup
Namaneo Aug 31, 2023
476a3f5
Audio worklet
Namaneo Sep 1, 2023
cb1c395
Custome desmume
Namaneo Sep 1, 2023
e28007b
Minor adjustments
Namaneo Sep 1, 2023
9852604
Lets try that
Namaneo Sep 1, 2023
e26f122
Or that
Namaneo Sep 1, 2023
4ffef08
Try without cond
Namaneo Sep 1, 2023
12b0acb
That was not it...
Namaneo Sep 1, 2023
0ffd6b8
Maybe that?
Namaneo Sep 2, 2023
38830e0
Safety sleep
Namaneo Sep 3, 2023
e75637a
Just some cleanup
Namaneo Sep 4, 2023
6015b2a
Cleanup + use rthreads
Namaneo Sep 6, 2023
bf93d11
Woops
Namaneo Sep 6, 2023
6ccda02
Huge rework of the native layer
Namaneo Sep 7, 2023
2e91fdd
JUN_Core to Junie
Namaneo Sep 7, 2023
600ef5d
Spaces to tabs
Namaneo Sep 7, 2023
3a799a5
Audio enable/disable on native side
Namaneo Sep 7, 2023
98cddc0
Remove some locks
Namaneo Sep 7, 2023
ef2f7f6
New icon
Namaneo Sep 8, 2023
fb4db29
A quick icon update
Namaneo Sep 8, 2023
fbeb9ce
Woops
Namaneo Sep 8, 2023
0ee3514
Re-woops
Namaneo Sep 8, 2023
099ac00
Bump version
Namaneo Sep 8, 2023
f53df70
Update pcsx
Namaneo Sep 8, 2023
8f66587
First pass of css cleanup
Namaneo Sep 8, 2023
97e7290
Video and audio through SAB
Namaneo Sep 8, 2023
bbb7375
Cleanup
Namaneo Sep 8, 2023
728ec73
Fix audio
Namaneo Sep 8, 2023
2f9c587
Cleanup
Namaneo Sep 8, 2023
fcfefbd
Revert because of iOS SAB memory leak
Namaneo Sep 8, 2023
ca95bb8
Cleanup UI
Namaneo Sep 8, 2023
388f8cd
Revert UI cleanup
Namaneo Sep 9, 2023
466f2c3
Save memories in another thread
Namaneo Sep 9, 2023
494f9ce
Cleanup
Namaneo Sep 10, 2023
d32461c
Draw and play each frame
Namaneo Sep 10, 2023
26c2eb6
Safer relaunch of cores
Namaneo Sep 10, 2023
078d7cf
Another try of Core in Parallel
Namaneo Sep 11, 2023
b251978
Still failing, reverting
Namaneo Sep 11, 2023
ab68ea8
This time should be good
Namaneo Sep 11, 2023
c8fabb3
With a bit of cleanup
Namaneo Sep 11, 2023
122947d
Very tiny little cleanup...
Namaneo Sep 11, 2023
5275386
Input processing rework
Namaneo Sep 11, 2023
323702e
Cleanup
Namaneo Sep 11, 2023
0d3f238
Another cleanup
Namaneo Sep 11, 2023
c016e25
Woops
Namaneo Sep 11, 2023
ed734cd
Some native improvements
Namaneo Sep 12, 2023
ff936b7
Accumulate audio frames
Namaneo Sep 12, 2023
db76301
Accurately accumate audio
Namaneo Sep 12, 2023
e7cf553
Woops
Namaneo Sep 18, 2023
cf0f0c5
Bump version
Namaneo Sep 18, 2023
5dbcc7e
Woops
Namaneo Sep 20, 2023
b90f993
Update cores
Namaneo Nov 2, 2023
831de2c
Update to WASI-SDK 22.0
Namaneo May 2, 2024
3581539
Update to WASI-SDK-24
Namaneo Aug 5, 2024
837a32e
Add `random_get` and disable LTO on app for now
Namaneo Aug 5, 2024
802107d
Let the compiler decide what's best
Namaneo Aug 5, 2024
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
31 changes: 13 additions & 18 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
**
.vscode
games
build

!.git
!assets/*.png
!src/*.c
!src/*.h
!web/*.js
!lib/Makefile*
!cores/Makefile*
!cores/override
deps/*
!deps/GNUmakefile

!main.c
!index.html
!settings.json
!Makefile*
!package.json
!package-lock.json
!server.js
cores/*
!cores/GNUmakefile
!cores/cores.json
!cores/*.a

!cores/**
!lib/**
app/build

ui/node_modules
ui/build
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker Image CI

on:
push:
branches:
- 'main'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: namaneo/junie

upload:
needs: docker
runs-on: ubuntu-latest
steps:
- name: Extract binaries
run: docker run --rm -v `pwd`/build:/build namaneo/junie cp -R /junie /build
- name: Upload Pages artifacts
uses: actions/upload-pages-artifact@v1
with:
path: build/junie/

deploy:
needs: upload
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
34 changes: 19 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Editor files
.vscode
node_modules

# Build files
*.a
*.o
include
tmp
bin
dist

# Core files
system
games
/.vscode
/games
/data
/build

deps/*/
deps/*.a
cores/*/
cores/*.a

app/build
app/sources/*.o

app/include/res_inputs.h

ui/build
ui/node_modules
ui/development.key
ui/development.cert
24 changes: 0 additions & 24 deletions .gitmodules

This file was deleted.

42 changes: 23 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
FROM debian AS build
# Build
FROM node AS build

WORKDIR /app

ENV HOME=/app
ENV TERM=vt100
WORKDIR /junie

RUN apt update
RUN apt install -y curl make clang wget git bsdmainutils
RUN apt install -y jq

ADD GNUmakefile .
ADD GNUmakefile.common .

RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz
RUN tar xvf wasi-sdk-12.0-linux.tar.gz
ADD ./ui/package.json ./ui/package.json
RUN make prepare

ADD ./ ./
ADD ./deps ./deps
RUN make deps

RUN make
ADD ./cores ./cores
RUN make cores

FROM alpine AS runtime
ADD ./app ./app
RUN make app

WORKDIR /app
ADD ./ui ./ui
RUN make ui

RUN apk add nodejs npm
# Run
FROM node:alpine AS run

COPY --from=build /app/bin/ ./bin/
COPY --from=build /app/assets/ ./assets/
WORKDIR /junie

ADD package.json ./
ADD server.js ./
RUN npm install --global http-server

RUN npm install
COPY --from=build /junie/ui/build .

ENTRYPOINT [ "node", "server.js" ]
CMD http-server . --port ${PORT:-8000} --cors -c-1
75 changes: 75 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
TARGET := junie
VERSION := 0.7.1-$(shell date +%s)

ifeq ($(DEBUG), 1)
BUILD := development
else
BUILD := production
endif

DEPS_DIR := deps
CORES_DIR := cores
APP_DIR := app
UI_DIR := ui
OUT_DIR := build

QUIET := > /dev/null 2>&1
MAKEFLAGS += --no-print-directory

UI_FLAGS := --version $(VERSION)
ifeq ($(DEBUG), 1)
UI_FLAGS += --debug
endif
ifeq ($(UI_ONLY), 1)
WATCH_CMD := $(MAKE) -C $(APP_DIR) DEBUG=$(DEBUG)
else
UI_FLAGS += --command "$(MAKE) -C ../$(APP_DIR) DEBUG=$(DEBUG)"
endif

.PHONY: deps cores app ui

# Build

all: clean prepare deps cores app ui

deps:
@$(MAKE) -C $(DEPS_DIR)

cores:
@$(MAKE) -C $(CORES_DIR)

app:
@$(MAKE) -C $(APP_DIR) DEBUG=$(DEBUG)

ui:
@echo Building application...
@( cd ui && node esbuild.mjs $(UI_FLAGS) $(QUIET) )

# Watch

watch: clean prepare deps cores
@$(WATCH_CMD)
@( cd ui && node esbuild.mjs --watch $(UI_FLAGS) )

# Common

prepare:
@echo Fetching dependencies...
@yarn --cwd $(UI_DIR) install $(QUIET)

# Pack

pack: all
@echo Packing Junie $(VERSION)...
@mkdir $(OUT_DIR)
@( cd $(UI_DIR)/$(OUT_DIR) && zip -r ../../$(OUT_DIR)/$(TARGET)-$(VERSION).zip `ls -I games` $(QUIET) )

# Clean

clean:
@$(MAKE) -C $(APP_DIR) clean
@rm -rf $(OUT_DIR) $(APP_DIR)/$(OUT_DIR) $(UI_DIR)/$(OUT_DIR)

clean-all: clean
@$(MAKE) -C $(DEPS_DIR) clean
@$(MAKE) -C $(CORES_DIR) clean
26 changes: 26 additions & 0 deletions GNUmakefile.common
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
WASI_SDK := $(shell pwd)/../deps/wasi-sdk
EMSCRIPTEN := $(shell pwd)/../deps/emsdk/upstream/emscripten
LIBRETRO := $(shell pwd)/../deps/libretro-common

MAKEFLAGS += --no-print-directory
QUIET := > /dev/null 2>&1

DEFINES += \
--sysroot=$(WASI_SDK)/share/wasi-sysroot \
--target=wasm32-wasi-threads -pthread \
-I$(EMSCRIPTEN)/cache/sysroot/include/c++/v1 \
-I$(EMSCRIPTEN)/cache/sysroot/include/compat \
-I$(EMSCRIPTEN)/cache/sysroot/include

ifeq ($(DEBUG), 1)
DEFINES += -O0 -ferror-limit=0 -DDEBUG
LDFLAGS += -O0 -g -Wl,--error-limit=0
else
DEFINES += -O3
LDFLAGS += -O3
endif

CC := $(WASI_SDK)/bin/clang $(DEFINES)
CXX := $(WASI_SDK)/bin/clang++ $(DEFINES)
AR := $(WASI_SDK)/bin/ar
RANLIB := $(WASI_SDK)/bin/ranlib
74 changes: 0 additions & 74 deletions Makefile

This file was deleted.

Loading