We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89e50e2 commit db87188Copy full SHA for db87188
1 file changed
Makefile
@@ -67,7 +67,7 @@ all: build
67
68
# Build targets
69
.PHONY: build
70
-build: $(STATIC_LIB) $(SHARED_LIB)
+build: $(BUILD_DIR) $(STATIC_LIB) $(SHARED_LIB)
71
72
# Create build directory
73
$(BUILD_DIR):
@@ -76,6 +76,7 @@ $(BUILD_DIR):
76
# Compile source files
77
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c $(HEADERS) | $(BUILD_DIR)
78
@echo "Compiling $< ($(BUILD_TYPE))"
79
+ @mkdir -p $(dir $@)
80
@$(CC) $(CFLAGS) $(INCLUDES) -fPIC -c $< -o $@
81
82
# Create static library
@@ -95,6 +96,7 @@ endif
95
96
# Test compilation
97
$(BUILD_DIR)/test_%.o: $(TEST_DIR)/%.c $(HEADERS) | $(BUILD_DIR)
98
@echo "Compiling test $<"
99
100
@$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
101
102
# Test executables
0 commit comments