From d3ea90f183a1742fe205f06ec6543f65869a6799 Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Tue, 17 May 2022 18:57:48 +1000 Subject: Add Linux support Oh boy this was a bit of a hassle lol - dynamic loading was the easiest part... but then came both sound and x11 Using SDL for now but I'd really like to change it for even lower layer, but then I might have to make my own mixer... oh no. --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cf64742..bc2e86a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ NAME = clak PREFIX = $(HOME)/.local CC = gcc -CFLAGS += -std=c99 -Wall -Wextra -Wshadow -Werror -pedantic +CFLAGS += -std=c99 -Wall -Wextra -Wshadow -Werror ifeq ($(OS),Windows_NT) LDLIBS = -lWinmm @@ -11,6 +11,9 @@ else UNAME_S := $(shell uname) ifeq ($(UNAME_S),Linux) PLATFORM = linux + PKG_CONF_LIBS = sdl2 SDL2_mixer x11 xi + CFLAGS += `pkg-config --cflags $(PKG_CONF_LIBS)` + LDLIBS += `pkg-config --libs $(PKG_CONF_LIBS)` endif endif @@ -21,4 +24,4 @@ $(NAME): $(NAME).c platform/$(PLATFORM).c clean: rm -f *.o - rm -f $(NAME) \ No newline at end of file + rm -f $(NAME) -- cgit