Skip to content

Commit db87188

Browse files
fixed the formatting
1 parent 89e50e2 commit db87188

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ all: build
6767

6868
# Build targets
6969
.PHONY: build
70-
build: $(STATIC_LIB) $(SHARED_LIB)
70+
build: $(BUILD_DIR) $(STATIC_LIB) $(SHARED_LIB)
7171

7272
# Create build directory
7373
$(BUILD_DIR):
@@ -76,6 +76,7 @@ $(BUILD_DIR):
7676
# Compile source files
7777
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c $(HEADERS) | $(BUILD_DIR)
7878
@echo "Compiling $< ($(BUILD_TYPE))"
79+
@mkdir -p $(dir $@)
7980
@$(CC) $(CFLAGS) $(INCLUDES) -fPIC -c $< -o $@
8081

8182
# Create static library
@@ -95,6 +96,7 @@ endif
9596
# Test compilation
9697
$(BUILD_DIR)/test_%.o: $(TEST_DIR)/%.c $(HEADERS) | $(BUILD_DIR)
9798
@echo "Compiling test $<"
99+
@mkdir -p $(dir $@)
98100
@$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
99101

100102
# Test executables

0 commit comments

Comments
 (0)