ci: don't require EXTRA_ prefix on input environment variables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
diff --git a/.github/workflows/n3ds.yml b/.github/workflows/n3ds.yml
index 964f445..20f7a15 100644
--- a/.github/workflows/n3ds.yml
+++ b/.github/workflows/n3ds.yml
@@ -47,13 +47,9 @@ jobs:
cat /tmp/n3ds_env.txt >> $GITHUB_ENV
- name: Verify sdl2-config
run: |
- export EXTRA_CFLAGS="$CFLAGS"
- export EXTRA_LDFLAGS="$LDFLAGS"
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
cmake/test/test_sdlconfig.sh
- name: Verify sdl2.pc
run: |
- export EXTRA_CFLAGS="$CFLAGS"
- export EXTRA_LDFLAGS="$LDFLAGS"
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
diff --git a/.github/workflows/ps2.yaml b/.github/workflows/ps2.yaml
index bfb0b1c..fdf6329 100644
--- a/.github/workflows/ps2.yaml
+++ b/.github/workflows/ps2.yaml
@@ -50,13 +50,13 @@ jobs:
- name: Verify sdl2-config
run: |
export CC=mips64r5900el-ps2-elf-gcc
+ export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
- export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
cmake/test/test_sdlconfig.sh
- name: Verify sdl2.pc
run: |
export CC=mips64r5900el-ps2-elf-gcc
- export EXTRA_LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
+ export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
diff --git a/.github/workflows/psp.yaml b/.github/workflows/psp.yaml
index addc7b1..d9f7620 100644
--- a/.github/workflows/psp.yaml
+++ b/.github/workflows/psp.yaml
@@ -39,12 +39,12 @@ jobs:
- name: Verify sdl2-config
run: |
export CC=psp-gcc
+ export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
- export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
cmake/test/test_sdlconfig.sh
- name: Verify sdl2.pc
run: |
export CC=psp-gcc
+ export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
- export EXTRA_LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
cmake/test/test_pkgconfig.sh
diff --git a/cmake/test/test_pkgconfig.sh b/cmake/test/test_pkgconfig.sh
index 7afc00b..500cd09 100755
--- a/cmake/test/test_pkgconfig.sh
+++ b/cmake/test/test_pkgconfig.sh
@@ -13,7 +13,7 @@ case "$machine" in
*android* )
EXEPREFIX="lib"
EXESUFFIX=".so"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared"
+ LDFLAGS="$LDFLAGS -shared"
;;
* )
EXEPREFIX=""
@@ -25,20 +25,20 @@ set -e
# Get the canonical path of the folder containing this script
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
-CFLAGS="$( pkg-config sdl2 --cflags )"
-LDFLAGS="$( pkg-config sdl2 --libs )"
-STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )"
-
-compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $CFLAGS $EXTRA_CFLAGS"
-link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"
-static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS"
-
-echo "-- CC: $CC"
-echo "-- CFLAGS: $CFLAGS"
-echo "-- EXTRA_CFLAGS: $EXTRA_CFLAGS"
-echo "-- LDFLASG: $LDFLAGS"
-echo "-- STATIC_LDFLAGS: $STATIC_LDFLAGS"
-echo "-- EXTRA_LDFLAGS: $EXTRA_LDFLAGS"
+SDL_CFLAGS="$( pkg-config sdl2 --cflags )"
+SDL_LDFLAGS="$( pkg-config sdl2 --libs )"
+SDL_STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )"
+
+compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $SDL_CFLAGS $CFLAGS"
+link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS"
+static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS"
+
+echo "-- CC: $CC"
+echo "-- CFLAGS: $CFLAGS"
+echo "-- LDFLASG: $LDFLAGS"
+echo "-- SDL_CFLAGS: $SDL_CFLAGS"
+echo "-- SDL_LDFLAGS: $SDL_LDFLAGS"
+echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS"
echo "-- COMPILE: $compile_cmd"
echo "-- LINK: $link_cmd"
diff --git a/cmake/test/test_sdlconfig.sh b/cmake/test/test_sdlconfig.sh
index 8de5421..fa41dbb 100755
--- a/cmake/test/test_sdlconfig.sh
+++ b/cmake/test/test_sdlconfig.sh
@@ -13,7 +13,7 @@ case "$machine" in
*android* )
EXEPREFIX="lib"
EXESUFFIX=".so"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared"
+ LDFLAGS="$LDFLAGS -shared"
;;
* )
EXEPREFIX=""
@@ -25,20 +25,20 @@ set -e
# Get the canonical path of the folder containing this script
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
-CFLAGS="$( sdl2-config --cflags )"
-LDFLAGS="$( sdl2-config --libs )"
-STATIC_LDFLAGS="$( sdl2-config --static-libs )"
-
-compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $EXTRA_CFLAGS"
-link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"
-static_link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS"
-
-echo "-- CC: $CC"
-echo "-- CFLAGS: $CFLAGS"
-echo "-- EXTRA_CFLAGS: $EXTRA_CFLAGS"
-echo "-- LDFLAGS: $LDFLAGS"
-echo "-- STATIC_LDFLAGS: $STATIC_LDFLAGS"
-echo "-- EXTRA_LDFLAGS: $EXTRA_LDFLAGS"
+SDL_CFLAGS="$( sdl2-config --cflags )"
+SDL_LDFLAGS="$( sdl2-config --libs )"
+SDL_STATIC_LDFLAGS="$( sdl2-config --static-libs )"
+
+compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $SDL_CFLAGS"
+link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $SDL_LDFLAGS $LDFLAGS"
+static_link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig_static${EXESUFFIX} $SDL_STATIC_LDFLAGS $LDFLAGS"
+
+echo "-- CC: $CC"
+echo "-- CFLAGS: $CFLAGS"
+echo "-- LDFLAGS: $LDFLAGS"
+echo "-- SDL_CFLAGS: $SDL_CFLAGS"
+echo "-- SDL_LDFLAGS: $SDL_LDFLAGS"
+echo "-- SDL_STATIC_LDFLAGS: $SDL_STATIC_LDFLAGS"
echo "-- COMPILE: $compile_cmd"
echo "-- LINK: $link_cmd"