diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-03 18:08:22 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-03 18:08:22 +0200 |
commit | d4c8bfd6f9fc4617b8abf7296cf65bcf5f7cc395 (patch) | |
tree | 8ae948332bcd44edc7c48e2d0698326dde6a66f2 /build/c/makefile | |
parent | chore(templates): Use new common files (diff) | |
download | flake-templates-d4c8bfd6f9fc4617b8abf7296cf65bcf5f7cc395.tar.gz flake-templates-d4c8bfd6f9fc4617b8abf7296cf65bcf5f7cc395.zip |
chore(build): Regenerate
Diffstat (limited to 'build/c/makefile')
-rw-r--r-- | build/c/makefile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/build/c/makefile b/build/c/makefile index 63ca24c..6128f06 100644 --- a/build/c/makefile +++ b/build/c/makefile @@ -12,8 +12,8 @@ BIN_PATH := $(BUILD_DIR)$(BIN_NAME) SRC := $(wildcard src/*.c) -OBJ := $(SRC:.c=.o) -DEP := $(OBJ:.o=.d) +OBJ := $(addprefix $(BUILD_DIR),$(notdir $(SRC:.c=.o))) +DEP := $(addprefix $(BUILD_DIR),$(notdir $(SRC:.c=.d))) LIBS := @@ -25,11 +25,11 @@ default: all all: $(BIN_NAME) $(BIN_NAME): $(OBJ) - $(CC) $(addprefix $(BUILD_DIR),$(notdir $(OBJ))) -o $(addprefix $(BUILD_DIR),$(notdir $(BIN_NAME))) $(ALL_CFLAGS) $(ALL_LDFLAGS) + $(CC) $^ -o $(addprefix $(BUILD_DIR),$(notdir $(BIN_NAME))) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(OBJ): $(SRC) - mkdir --parents $(BUILD_DIR) - $(CC) -c $< -o $(addprefix $(BUILD_DIR),$(notdir $(OBJ))) $(ALL_CFLAGS) + @mkdir --parents $(BUILD_DIR) + $(CC) -c -o $@ $(addprefix ./src/,$(patsubst %.o,%.c,$(notdir $@))) $(ALL_CFLAGS) manual: mkdir --parents $(BUILD_DIR)docs |