sdl2-compat: immintrin.h handling isn't needed anymore for building compat libSDL2.

From b877d988ac0504eaf6bd66080ee555d3592282bc Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 4 Dec 2022 23:56:04 +0300
Subject: [PATCH] immintrin.h handling isn't needed anymore for building compat
 libSDL2.

but SDL2_test, SDL2_main and SDL2 test programs still need it, because
they use SDL2 headers.
---
 CMakeLists.txt      | 5 +++--
 src/Makefile.darwin | 1 -
 src/Makefile.linux  | 1 -
 src/Makefile.mingw  | 1 -
 src/Makefile.vc     | 4 ++--
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd78ffe..f9c8177 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -200,8 +200,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
   endif()
 endif()
 
-# !!! FIXME: is this still necessary with SDL2?
-# just in case:
+# This isn't needed for compat libSDL2 who use SDL3 headers.
+# SDL2_test and SDL2_main (and the tes programs) still need
+# this, because they use SDL2 headers.
 check_include_file("immintrin.h" HAVE_IMMINTRIN_H)
 if(NOT HAVE_IMMINTRIN_H)
   set(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DSDL_DISABLE_IMMINTRIN_H")
diff --git a/src/Makefile.darwin b/src/Makefile.darwin
index bad223f..0d983b6 100644
--- a/src/Makefile.darwin
+++ b/src/Makefile.darwin
@@ -15,7 +15,6 @@ endif
 LD = $(CC)
 
 CPPFLAGS = -DNDEBUG -D_THREAD_SAFE
-CPPFLAGS+= -DSDL_DISABLE_IMMINTRIN_H
 
 CFLAGS  = -fPIC -fvisibility=hidden -O3 -Wall
 LDFLAGS = -dynamiclib -Wl,-undefined,error -Wl,-single_module
diff --git a/src/Makefile.linux b/src/Makefile.linux
index 9807989..b1f6a2d 100644
--- a/src/Makefile.linux
+++ b/src/Makefile.linux
@@ -7,7 +7,6 @@ CC = gcc
 LD = $(CC)
 
 CPPFLAGS = -DNDEBUG -D_THREAD_SAFE -D_REENTRANT
-CPPFLAGS+= -DSDL_DISABLE_IMMINTRIN_H
 
 CFLAGS  = -fPIC -fvisibility=hidden -O3 -Wall
 LDFLAGS = -shared -Wl,-soname,libSDL2-2.0.so.0
diff --git a/src/Makefile.mingw b/src/Makefile.mingw
index a1df5c9..bd67b90 100644
--- a/src/Makefile.mingw
+++ b/src/Makefile.mingw
@@ -14,7 +14,6 @@ endif
 LD = $(CC)
 
 CPPFLAGS = -DDLL_EXPORT -DNDEBUG
-CPPFLAGS+= -DSDL_DISABLE_IMMINTRIN_H
 
 CFLAGS  = -O3 -Wall
 LDFLAGS = -nostdlib -shared -Wl,--no-undefined -Wl,--enable-auto-image-base -Wl,--out-implib,$(LIB)
diff --git a/src/Makefile.vc b/src/Makefile.vc
index 2611b4b..47e12ef 100644
--- a/src/Makefile.vc
+++ b/src/Makefile.vc
@@ -8,7 +8,6 @@
 INCLUDES = -Iinclude
 
 CPPFLAGS = -DNDEBUG -DDLL_EXPORT
-CPPFLAGS = $(CPPFLAGS) -DSDL_DISABLE_IMMINTRIN_H
 
 CC = cl
 LD = link
@@ -38,5 +37,6 @@ $(DLLNAME): $(OBJ)
 	$(RC) /r /Fo$@ $<
 
 distclean: clean
+	-del $(DLLNAME) $(IMPNAME)
 clean:
-	-del dynapi\*.obj *.obj *.res *.exp *.manifest $(DLLNAME) $(IMPNAME)
+	-del dynapi\*.obj *.obj *.res *.exp *.manifest