Setting up GLFW + GLAD + make manually

Hi,

I am about to learn about how I can use make to build for example a complete game or system with lots of files with code.

I remember when glfw was more easy to setup manually. Now I have problems with the documentation on a Linux machine (debian).

How do I setup so that I can run this manually without Cmake?

I want to learn the beauty of make when checking dependencies and so on. Therefore I want to have total control with simple makefiles in the beginning

download glfw, unzip, and place include/GLFW-folder in my 3pp folder
Generate glad.zip file and place them correctly
installing libglfw3 and libglfw3 - do I need them when downloading it?
which flags in makefile should I use?
-lglad? glad.c? -glfw3

suppose I have a main.cpp with the glfw example code with glad.
I have a Makefile in same folder

Thanks for debian help with this. Maybe there can be a more straightforward approach on website.

Or am I stupid who doesnt use the cmake approach? It’s so damn big, I totally loose control over that.

Think I got it, realised I can still have an own makefile while using cmake to build glfw for example.

Hi @Lift0,

Welcome to the GLFW forum.

It looks like you have already solved your problem - building from source with cmake and then using makefiles is certainly a valid approach, though cmake can be fairly simple as per this GLFW-cmake-starter. Using makefiles is certainly slightly harder than using cmake, though GLFW is a relatively simple library so if you are already familiar with creating makefiles then this shouldn’t be difficult. If you haven’t already (I’m guessing you have) take a look at the documentation on building applications with pkg-config on Unix to get started.