Skip to content

Commit

Permalink
use pkgconfig for linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvlevi committed Apr 28, 2024
2 parents 16e2d41 + 3bab2af commit 5bf6f67
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@ endif

ifeq ($(PLATFORM), win)
CFLAGS = -Wall -I/usr/x86_64-w64-mingw32/include -L/usr/x86_64-w64-mingw32/lib

LDFLAGS := -L/usr/x86_64-w64-mingw32\
-lglfw3\
-lopengl32\
-lgdi32\
-llua\
-lm
else
CFLAGS = -Wall -I/usr/include -L/usr/lib
LDFLAGS := -L/usr/lib -lglfw -llua -lGL -lm -lrt -ldl
CFLAGS = -Wall $(pkg-config --cflags lua5.4)
LDFLAGS :=\
$(shell pkg-config --libs lua5.4)\
$(shell pkg-config --libs glfw3)\
$(shell pkg-config --libs gl)\
-lm -lrt -ldl
endif

SOURCES = $(wildcard $(SRCDIR)/*.c) $(wildcard $(SRCDIR)/bindings/*.c)
Expand Down

0 comments on commit 5bf6f67

Please sign in to comment.