mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-16 21:45:45 +01:00
move pkg-config usage to be inside architecture definitions
This commit is contained in:
8
makefile
8
makefile
@@ -13,8 +13,8 @@ ARCH ?= 0
|
|||||||
# compiler settings
|
# compiler settings
|
||||||
CC := clang
|
CC := clang
|
||||||
STD := c17
|
STD := c17
|
||||||
CFLAGS := $(shell pkg-config --cflags sdl2 SDL2_ttf) -m32 -Wall -Wextra -Wpedantic -Wno-pointer-arith
|
CFLAGS := -m32 -Wall -Wextra -Wpedantic -Wno-pointer-arith
|
||||||
LDFLAGS := $(shell pkg-config --libs sdl2 SDL2_ttf) -m32 -lm
|
LDFLAGS := -m32 -lm
|
||||||
|
|
||||||
ifneq ($(DEBUG),0)
|
ifneq ($(DEBUG),0)
|
||||||
CFLAGS += -g -Og -fsanitize=address,undefined
|
CFLAGS += -g -Og -fsanitize=address,undefined
|
||||||
@@ -27,8 +27,8 @@ endif
|
|||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
ifeq ($(ARCH),linux-x86)
|
ifeq ($(ARCH),linux-x86)
|
||||||
CFLAGS += -target x86_64-pc-linux-gnu
|
CFLAGS += -target x86_64-pc-linux-gnu $(shell pkg-config --cflags sdl2 SDL2_ttf)
|
||||||
LDFLAGS += -target x86_64-pc-linux-gnu
|
LDFLAGS += -target x86_64-pc-linux-gnu $(shell pkg-config --libs sdl2 SDL2_ttf)
|
||||||
else ifeq ($(ARCH),win-x86)
|
else ifeq ($(ARCH),win-x86)
|
||||||
CFLAGS += -target x86_64-pc-windows-gnu
|
CFLAGS += -target x86_64-pc-windows-gnu
|
||||||
LDFLAGS += -target x86_64-pc-windows-gnu -fuse-ld=lld
|
LDFLAGS += -target x86_64-pc-windows-gnu -fuse-ld=lld
|
||||||
|
|||||||
Reference in New Issue
Block a user