aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/install-msys2.ps12
-rwxr-xr-xscripts/install-packages-mingw.sh3
-rw-r--r--scripts/msys2-path.env3
-rw-r--r--src/.gitignore1
-rw-r--r--src/makefile6
5 files changed, 11 insertions, 4 deletions
diff --git a/scripts/install-msys2.ps1 b/scripts/install-msys2.ps1
index e7e0472..c7cb022 100644
--- a/scripts/install-msys2.ps1
+++ b/scripts/install-msys2.ps1
@@ -1,3 +1,3 @@
-Start-BitsTransfer -Source https://github.com/msys2/msys2-installer/releases/download/2022-09-04/msys2-x86_64-20220904.exe -Destination .\msys2-x86_64-latest.exe
+Start-BitsTransfer -Source https://github.com/msys2/msys2-installer/releases/download/2023-01-27/msys2-x86_64-20230127.exe -Destination .\msys2-x86_64-latest.exe
.\msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys64
Remove-Item .\msys2-x86_64-latest.exe
diff --git a/scripts/install-packages-mingw.sh b/scripts/install-packages-mingw.sh
index 9acb392..931c66f 100755
--- a/scripts/install-packages-mingw.sh
+++ b/scripts/install-packages-mingw.sh
@@ -1,5 +1,6 @@
#!/bin/sh
pacman --noconfirm --needed -Sy \
+ base-devel wget curl \
make git \
mingw-w64-x86_64-arm-none-eabi-gcc \
mingw-w64-x86_64-arm-none-eabi-gdb \
@@ -7,6 +8,8 @@ pacman --noconfirm --needed -Sy \
mingw-w64-x86_64-arm-none-eabi-binutils \
mingw-w64-x86_64-stlink \
mingw-w64-x86_64-gdb-multiarch \
+ mingw-w64-x86_64-gcc \
+ mingw-w64-x86_64-SDL2 \
python python-pip
pip3 install compiledb
diff --git a/scripts/msys2-path.env b/scripts/msys2-path.env
new file mode 100644
index 0000000..d0b4ee1
--- /dev/null
+++ b/scripts/msys2-path.env
@@ -0,0 +1,3 @@
+# this file should be sourced from msys2
+export C_INCLUDE_PATH="/mingw64/include:$CPLUS_INCLUDE_PATH"
+export LIBRARY_PATH="/mingw64/lib:$CPLUS_INCLUDE_PATH"
diff --git a/src/.gitignore b/src/.gitignore
index 8b91843..67661d0 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -2,3 +2,4 @@
main.elf
main.bin
main
+main.exe
diff --git a/src/makefile b/src/makefile
index 83c7df5..1f1dc65 100644
--- a/src/makefile
+++ b/src/makefile
@@ -5,6 +5,8 @@ TARGET = main
# platform is ds (desktop) or stm (stm32)
PLATFORM = ds
+HOST=$(strip $(shell uname -o))
+
ifeq ($(PLATFORM),stm)
STM = true
include stm32.mk
@@ -14,8 +16,6 @@ DESKTOP = true
include ds.mk
endif
-HOST=$(strip $(shell uname -o))
-
SHARED_FLAGS += -g
SHARED_FLAGS += -Wall
SHARED_FLAGS += -Wextra
@@ -72,7 +72,7 @@ flash: $(TARGET).bin
$(CC) -c $(CFLAGS) $< -o $@
$(TARGET): $(OBJS)
- $(LD) $(LFLAGS) $^ -o $@
+ $(LD) $^ $(LFLAGS) -o $@
compile_commands.json:
compiledb make -Bn