fixed includes
This commit is contained in:
@@ -14,7 +14,7 @@ jobs:
|
||||
- name: install libs
|
||||
run: sudo apt install -y libglfw3-dev libgl-dev
|
||||
- name: gcc
|
||||
run: mkdir -p build && gcc -v -Wall -Wextra -Werror src/*.c src/*.h -lglfw -lGL -lm -Iinclude
|
||||
run: mkdir -p build && gcc -v -Wall -Wextra -Werror src/*.c src/*.h -lglfw -lGL -lm -Iinclude -DGLFW_INCLUDE_NONE
|
||||
|
||||
build-release:
|
||||
needs: lint
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects -Wall
|
||||
bin_PROGRAMS = forge
|
||||
forge_SOURCES = src/main.c src/args.c src/forge.c src/file.c src/window.c src/shaders.c $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/linmath.h
|
||||
forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(top_srcdir)/include
|
||||
forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(top_srcdir)/include -DGLFW_INCLUDE_NONE
|
||||
forge_LDADD = -lm -lGL -lglfw
|
||||
include_HEADERS = src/main.h src/args.h src/config.h src/types.h src/forge.h src/file.h src/constants.h src/window.h src/shaders.h
|
||||
@@ -14,6 +14,7 @@ build:
|
||||
-Iinclude \
|
||||
-lm -lGL -lglfw \
|
||||
-Wall -Wextra \
|
||||
-DGLFW_INCLUDE_NONE \
|
||||
-o build/$(TARGET)
|
||||
|
||||
run: build
|
||||
|
||||
+2
-1
@@ -1 +1,2 @@
|
||||
-Iinclude
|
||||
-Iinclude
|
||||
-DGLFW_INCLUDE_NONE
|
||||
@@ -1,7 +1,9 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glad/gl.h>
|
||||
#include <linmath.h>
|
||||
|
||||
#include "file.h"
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
#ifndef GLFW_H
|
||||
#define GLFW_H
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <glad/gl.h>
|
||||
#include <linmath.h>
|
||||
|
||||
#include "constants.h"
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
#include <glad/gl.h>
|
||||
#include <linmath.h>
|
||||
|
||||
#ifndef GLFW_INCLUDE_NONE
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
#endif
|
||||
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
+5
-1
@@ -1,3 +1,4 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -6,7 +7,10 @@
|
||||
#include "config.h"
|
||||
#include "types.h"
|
||||
|
||||
#include "glfw.h"
|
||||
#ifndef GLAD_GL_IMPLEMENTATION
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
#endif
|
||||
|
||||
// TODO split into smaller functions
|
||||
// TODO custom struct to remove glfw in signature
|
||||
|
||||
Reference in New Issue
Block a user