From 93f3025b2e70ea94caebf0b02283f090ee2eb2ff Mon Sep 17 00:00:00 2001 From: crazyBaboon Date: Tue, 1 Oct 2019 23:24:54 +0100 Subject: [PATCH] Some make files are now compatible with FreeBSD --- demo/glfw_opengl2/Makefile | 6 +++++- demo/glfw_opengl3/Makefile | 3 +++ example/Makefile | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/demo/glfw_opengl2/Makefile b/demo/glfw_opengl2/Makefile index c08d65f9..671c8166 100644 --- a/demo/glfw_opengl2/Makefile +++ b/demo/glfw_opengl2/Makefile @@ -12,10 +12,14 @@ BIN := $(BIN).exe LIBS = -lglfw3 -lopengl32 -lm -lGLU32 else UNAME_S := $(shell uname -s) + GLFW3 := $(shell pkg-config --libs glfw3) ifeq ($(UNAME_S),Darwin) LIBS := -lglfw3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib + else ifeq ($(UNAME_S),FreeBSD) + LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW + CFLAGS += -I/usr/local/include else - LIBS = -lglfw -lGL -lm -lGLU + LIBS = $(GLFW3) -lGL -lm -lGLU endif endif diff --git a/demo/glfw_opengl3/Makefile b/demo/glfw_opengl3/Makefile index da952617..b72f9067 100644 --- a/demo/glfw_opengl3/Makefile +++ b/demo/glfw_opengl3/Makefile @@ -15,6 +15,9 @@ else GLFW3 := $(shell pkg-config --libs glfw3) ifeq ($(UNAME_S),Darwin) LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib + else ifeq ($(UNAME_S),FreeBSD) + LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW + CFLAGS += -I/usr/local/include else LIBS = $(GLFW3) -lGL -lm -lGLU -lGLEW endif diff --git a/example/Makefile b/example/Makefile index a3ae6f04..01e8aef9 100644 --- a/example/Makefile +++ b/example/Makefile @@ -11,6 +11,9 @@ else ifeq ($(UNAME_S),Darwin) LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib CFLAGS += -I/usr/local/include + else ifeq ($(UNAME_S),FreeBSD) + LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW + CFLAGS += -I/usr/local/include else LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW endif