From 97e5dae4db05c091ad68ff2b72b92ec714f4725d Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 25 Mar 2024 00:54:18 +0400 Subject: [PATCH] In Makefile use LDFLAGS only for build of an executable, and CFLAGS only for build of the object files. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a69c006..1c3a318 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,10 @@ CFLAGS = --std=c99 -D_POSIX_C_SOURCE=200112L -O3 -Wall -Werror -Wextra -pedantic LDFLAGS += -lportaudio -lopus -lsodium $(TARGET): $(OBJs) - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ + $(CC) $(LDFLAGS) $^ -o $@ $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR) - $(CC) $(CFLAGS) $(LDFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ $(OBJ_DIR): mkdir -p $@