aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-19 21:41:09 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-19 21:41:09 +0200
commit3b2e7cc2347d88dbd8d7697a7cbd8354e7728fc0 (patch)
tree56cd83dca6d3627844347cc2ca86a6f6255f87d5 /Makefile
parentb0998910dd974280b3c6f3f65e21bfd5859b117f (diff)
downloadmandelbrot-3b2e7cc2347d88dbd8d7697a7cbd8354e7728fc0.tar.gz
mandelbrot-3b2e7cc2347d88dbd8d7697a7cbd8354e7728fc0.tar.bz2
mandelbrot-3b2e7cc2347d88dbd8d7697a7cbd8354e7728fc0.zip
Added OpenGL boilerplate
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e6c83dc..0b2f4ab 100644
--- a/Makefile
+++ b/Makefile
@@ -7,9 +7,10 @@ INC_DIR = inc
OBJ_DIR = obj
CC = gcc
-OFLAG = -Ofast -funroll-loops -ffast-math
-CCFLAGS = -I$(INC_DIR) -Wall -Wextra $(OFLAG)
-LDFLAGS = -lm -lpthread $(shell sdl2-config --libs --cflags)
+OFLAG = -O0 #-Ofast -funroll-loops -ffast-math
+CCFLAGS = -I$(INC_DIR) -Wall -Wextra -Wpedantic $(OFLAG) \
+ $(shell pkg-config --cflags sdl2 glew)
+LDFLAGS = $(shell pkg-config --libs sdl2 glew)
INC = $(shell find $(INC_DIR) -type f -name '*.h')
SRC = $(shell find $(SRC_DIR) -type f -name '*.c')
@@ -23,7 +24,7 @@ prebuild:
$(NAME): $(OBJ)
$(CC) -o $@ $(OBJ) $(LDFLAGS)
-$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(HEADER)
+$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(INC)
$(CC) $(CCFLAGS) -c -o $@ $<
debug: OFLAG = -g