Tweaking headers

This commit is contained in:
Joseph Ferano 2023-10-14 22:49:53 +07:00
parent c2b2f5868a
commit 181303a362
2 changed files with 6 additions and 9 deletions

View File

@ -1,7 +1,7 @@
P=main
OBJECTS=libs/glad/glad.o
CFLAGS=-g -Wall -Wextra -O0
LDLIBS=-lglfw -lOpenGL -lm -lSDL2
LDLIBS=-lglfw -lOpenGL -lm
INCLUDES=-Ilibs/glad/include/ -Ilibs/
CC=gcc
RM=rm -vf
@ -10,9 +10,9 @@ RM=rm -vf
build: clean
$(CC) $(CFLAGS) $(LDLIBS) $(INCLUDES) $(OBJECTS) $(P).c -o $(P)
.PHONY: texturepacker
texturepacker:
$(CC) $(CFLAGS) $(LDLIBS) $(INCLUDES) $(OBJECTS) tools/texturepacker.c -o texturepacker
.PHONY: all
headers: clean
$(CC) $(CFLAGS) $(LDLIBS) $(INCLUDES) $(OBJECTS) all.h -o all.h.gch
.PHONY: run
run: build

7
lib.h
View File

@ -1,6 +1,5 @@
#ifndef TENCHU_LIB_H
#define TENCHU_LIB_H
#pragma once
#include <GLFW/glfw3.h>
#include <string.h>
void checkCode(int code, char* errorMsg) {
@ -113,5 +112,3 @@ unsigned int compileShaderProgram(char* vertSrcPath, char* fragSrcPath, char* ge
return program;
}
#endif