polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit 2326334a4417a830b344ec5c1bd03971fd3d0e02
parent 43e5709261c80abd34a2c6bcdac6614c62106ebd
Author: William Casarin <jb55@jb55.com>
Date:   Wed,  4 Aug 2021 11:00:49 -0700

fix build

Diffstat:
MMakefile | 7++++---
Msrc/gl.h | 2+-
Msrc/hires.c | 2+-
Msrc/input.h | 2+-
4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -7,19 +7,20 @@ DEFS= -DGLFW_INCLUDE_NONE -DDEBUG # CFLAGS = $(DEFS) -ggdb -O0 -I src -Wall -Wextra -std=c99 \ -BASE_CFLAGS = $(DEFS) -O1 -g -I src -Wall -Werror -Wextra -std=c99 \ +BASE_CFLAGS = $(DEFS) -O2 -g -I src -Wall -Werror -Wextra -std=c99 \ -Wno-unused-function \ -Wno-unused-parameter \ -Wno-unused-variable \ -Wmissing-field-initializers \ -Wno-cast-align \ - -Wno-padded + -Wno-padded \ + $(shell pkg-config --cflags sdl2 gl) CFLAGS = $(BASE_CFLAGS) EM_CFLAGS = $(BASE_CFLAGS) -LDFLAGS = -lSDL2 -lGL -lm +LDFLAGS = $(shell pkg-config --libs sdl2 gl) -lm SRC=src SRCS=$(wildcard $(SRC)/*.c) diff --git a/src/gl.h b/src/gl.h @@ -2,7 +2,7 @@ #define POLYADVENT_GL_H /* #include <epoxy/gl.h> */ -#include <SDL/SDL.h> +#include <SDL.h> #include <GL/gl.h> /* #include <GL/glx.h> diff --git a/src/hires.c b/src/hires.c @@ -1,7 +1,7 @@ #include <time.h> #include "common.h" -#include <SDL/SDL.h> +#include <SDL.h> double hires_time_in_seconds() { double ticks_per_sec = (double)SDL_GetPerformanceFrequency(); diff --git a/src/input.h b/src/input.h @@ -3,7 +3,7 @@ #ifndef POLYADVENT_INPUT_H #define POLYADVENT_INPUT_H -#include <SDL/SDL.h> +#include <SDL.h> #include "common.h" /* enum key_state { */