disables intrinsics on SDL demos
SDL library has an issue where it expects intrinsics headers to be provided, but intrinsics are not exactly part of a standard, so there is no guarantee that they will be available. As such, the library allows you to turn them off. I am disabling them to allow for better portability and ease of compilation.
This commit is contained in:
parent
6566d9075d
commit
b6a7791d13
@ -2,7 +2,7 @@
|
|||||||
BIN = demo
|
BIN = demo
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2
|
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2 -DSDL_DISABLE_IMMINTRIN_H
|
||||||
|
|
||||||
SRC = main.c
|
SRC = main.c
|
||||||
OBJ = $(SRC:.c=.o)
|
OBJ = $(SRC:.c=.o)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* ===============================================================*/
|
* ===============================================================*/
|
||||||
/* This are some code examples to provide a small overview of what can be
|
/* This are some code examples to provide a small overview of what can be
|
||||||
* done with this library. To try out an example uncomment the defines */
|
* done with this library. To try out an example uncomment the defines */
|
||||||
/*#define INCLUDE_ALL */
|
#define INCLUDE_ALL
|
||||||
/*#define INCLUDE_STYLE */
|
/*#define INCLUDE_STYLE */
|
||||||
/*#define INCLUDE_CALCULATOR */
|
/*#define INCLUDE_CALCULATOR */
|
||||||
/*#define INCLUDE_CANVAS */
|
/*#define INCLUDE_CANVAS */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
BIN = demo
|
BIN = demo
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2
|
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2 -DSDL_DISABLE_IMMINTRIN_H
|
||||||
|
|
||||||
SRC = main.c
|
SRC = main.c
|
||||||
OBJ = $(SRC:.c=.o)
|
OBJ = $(SRC:.c=.o)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
BIN = demo
|
BIN = demo
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2
|
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2 -DSDL_DISABLE_IMMINTRIN_H
|
||||||
|
|
||||||
SRC = main.c
|
SRC = main.c
|
||||||
OBJ = $(SRC:.c=.o)
|
OBJ = $(SRC:.c=.o)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
BIN = demo
|
BIN = demo
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CFLAGS += -std=c89 -pedantic -O0
|
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2 -DSDL_DISABLE_IMMINTRIN_H
|
||||||
CFLAGS += `sdl2-config --cflags`
|
CFLAGS += `sdl2-config --cflags`
|
||||||
|
|
||||||
SRC = main.c
|
SRC = main.c
|
||||||
|
@ -3,6 +3,7 @@ BIN = demo
|
|||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CFLAGS += -std=c89 -Wall -Wextra -pedantic -fsanitize=address -O2
|
CFLAGS += -std=c89 -Wall -Wextra -pedantic -fsanitize=address -O2
|
||||||
|
CFLAGS += -DSDL_DISABLE_IMMINTRIN_H
|
||||||
|
|
||||||
SRC = main.c
|
SRC = main.c
|
||||||
OBJ = $(SRC:.c=.o)
|
OBJ = $(SRC:.c=.o)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
BIN = demo
|
BIN = demo
|
||||||
|
|
||||||
# Compiler
|
# Compiler
|
||||||
CC = clang
|
CC ?= clang
|
||||||
DCC = gcc
|
DCC = gcc
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
@ -13,11 +13,11 @@ OBJ = $(SRC:.c=.o)
|
|||||||
|
|
||||||
# Modes
|
# Modes
|
||||||
.PHONY: gcc
|
.PHONY: gcc
|
||||||
gcc: CC = gcc
|
gcc: CC ?= gcc
|
||||||
gcc: $(BIN)
|
gcc: $(BIN)
|
||||||
|
|
||||||
.PHONY: clang
|
.PHONY: clang
|
||||||
clang: CC = clang
|
clang: CC ?= clang
|
||||||
clang: $(BIN)
|
clang: $(BIN)
|
||||||
|
|
||||||
$(BIN):
|
$(BIN):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
BIN = demo
|
BIN = demo
|
||||||
|
|
||||||
# Compiler
|
# Compiler
|
||||||
CC = clang
|
CC ?= clang
|
||||||
DCC = gcc
|
DCC = gcc
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
@ -13,11 +13,11 @@ OBJ = $(SRC:.c=.o)
|
|||||||
|
|
||||||
# Modes
|
# Modes
|
||||||
.PHONY: gcc
|
.PHONY: gcc
|
||||||
gcc: CC = gcc
|
gcc: CC ?= gcc
|
||||||
gcc: $(BIN)
|
gcc: $(BIN)
|
||||||
|
|
||||||
.PHONY: clang
|
.PHONY: clang
|
||||||
clang: CC = clang
|
clang: CC ?= clang
|
||||||
clang: $(BIN)
|
clang: $(BIN)
|
||||||
|
|
||||||
$(BIN):
|
$(BIN):
|
||||||
|
Loading…
Reference in New Issue
Block a user