b6a7791d13
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.
27 lines
353 B
Makefile
27 lines
353 B
Makefile
# Install
|
|
BIN = demo
|
|
|
|
# Compiler
|
|
CC ?= clang
|
|
DCC = gcc
|
|
|
|
# Flags
|
|
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2
|
|
|
|
SRC = main.c
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
# Modes
|
|
.PHONY: gcc
|
|
gcc: CC ?= gcc
|
|
gcc: $(BIN)
|
|
|
|
.PHONY: clang
|
|
clang: CC ?= clang
|
|
clang: $(BIN)
|
|
|
|
$(BIN):
|
|
@mkdir -p bin
|
|
rm -f bin/$(BIN) $(OBJS)
|
|
$(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) -lX11 -lm -lGL -lm -lGLU
|