shithub: psxe

Download patch

ref: d842b17283636fe618b76bbd766e255fcd441c75
parent: 861f2ea8452d1befd96d6f670689d8350ec2ec12
author: allkern <lisandroaalarcon@gmail.com>
date: Wed Jun 21 19:50:52 EDT 2023

Put macOS build on tarball

--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -19,7 +19,8 @@
            ./build.sh
            mkdir -p psxe
            mv psxe.app psxe
+           tar -czf psxe-macos-latest.tar.gz psxe
     - uses: actions/upload-artifact@v3
       with:
         name: psxe-macos-latest
-        path: psxe/
+        path: ./psxe-macos-latest.tar.gz
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,15 @@
 .ONESHELL:
 
+CFLAGS += -g -DLOG_USE_COLOR -lSDL2 -lSDL2main
+CFLAGS += -Ofast -Wno-overflow -Wall -pedantic
+CFLAGS += -Wno-newline-eof
+
+PLATFORM := $(shell uname -s)
+
+ifeq ($(PLATFORM),Darwin)
+	CFLAGS += -mmacosx-version-min=10.9 -Wno-newline-eof
+endif
+
 VERSION_TAG := $(shell git describe --always --tags --abbrev=0)
 COMMIT_HASH := $(shell git rev-parse --short HEAD)
 OS_INFO := $(shell uname -rmo)
@@ -12,13 +22,10 @@
 	mkdir -p bin
 
 	gcc $(SOURCES) -o bin/psxe \
-		-I"." \
 		-DOS_INFO="$(OS_INFO)" \
 		-DREP_VERSION="$(VERSION_TAG)" \
 		-DREP_COMMIT_HASH="$(COMMIT_HASH)" \
-		-g -DLOG_USE_COLOR -lSDL2 -lSDL2main \
-		-Ofast -Wno-overflow -Wall -pedantic \
-		-Wno-newline-eof
+		$(CFLAGS)
 
 clean:
 	rm -rf "bin"
--- a/build-win.bat
+++ /dev/null
@@ -1,21 +1,0 @@
-@echo off
-
-set PSX_DIR=.
-set SDL2_DIR=SDL2-2.26.5\x86_64-w64-mingw32
-
-if not exist bin/ (
-    mkdir bin
-)
-
-gcc psx/*.c psx/dev/*.c frontend/*.c -o bin/psxe^
-    -L"%SDL2_DIR%/lib"^
-    -I"%SDL2_DIR%\include"^
-    -I"%SDL2_DIR%\include\SDL2"^
-    -I"%PSX_DIR%"^
-    -I"."^
-    -DOS_INFO="%OS_INFO%"^
-    -DREP_VERSION="%VERSION_TAG%"^
-    -DREP_COMMIT_HASH="%COMMIT_HASH%"^
-    -DLOG_USE_COLOR -lSDL2 -lSDL2main^
-    -Ofast -Wno-overflow -Wall -pedantic^
-    -ffast-math
\ No newline at end of file
--