commit b5e2d533cd35cbd0ff103d959dc71fc216947e0c
parent 33f5c3a6530d27c11d7d5188fe6213368d35661f
Author: Friedel Schön <[email protected]>
Date: Mon, 8 May 2023 23:24:58 +0200
don't override -Iincl
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -8,8 +8,8 @@ MAN_DIR := src/man
ROFF_DIR := man
# Compiler Options
-CC ?= gcc
-CFLAGS ?= -I$(INCLUDE_DIR) -Wall -Wextra -g
+CC ?= gcc
+CFLAGS ?= -Wall -Wextra -g
LDFLAGS ?= -fPIE
# Executable-specific flags
@@ -53,11 +53,11 @@ $(INTERMED_DIRS):
# Object rules
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c $(INCLUDE_FILES) | $(BUILD_DIR)
- $(CC) -o $@ -c $(CFLAGS) $<
+ $(CC) -o $@ -c -I$(INCLUDE_DIR) $(CFLAGS) $<
# Executables
$(BIN_DIR)/%: $(EXEC_DIR)/%.c $(INCLUDE_FILES) $(OBJ_FILES) | $(BIN_DIR)
- $(CC) -o $@ $(CFLAGS) $< $(OBJ_FILES) $($(notdir $@)_FLAGS) $(LDFLAGS)
+ $(CC) -o $@ -I$(INCLUDE_DIR) $(CFLAGS) $< $(OBJ_FILES) $($(notdir $@)_FLAGS) $(LDFLAGS)
$(BIN_DIR)/%: $(EXEC_DIR)/%.sh | $(BIN_DIR)
cp $< $@