Update c.make file to include hashlib directory
@@ -26,8 +26,8 @@ else
endif
# Files.
-HEADERS := $(wildcard $(SOURCE_DIR)/*.h) $(wildcard $(SOURCE_DIR)/datatypes/*.h) $(wildcard $(SOURCE_DIR)/optionals/*.h)
-SOURCES := $(wildcard $(SOURCE_DIR)/*.c) $(wildcard $(SOURCE_DIR)/datatypes/*.c) $(wildcard $(SOURCE_DIR)/optionals/*.c)
+HEADERS := $(wildcard $(SOURCE_DIR)/*.h) $(wildcard $(SOURCE_DIR)/datatypes/*.h) $(wildcard $(SOURCE_DIR)/optionals/*.h) $(wildcard $(SOURCE_DIR)/optionals/hashlib/*.h)
+SOURCES := $(wildcard $(SOURCE_DIR)/*.c) $(wildcard $(SOURCE_DIR)/datatypes/*.c) $(wildcard $(SOURCE_DIR)/optionals/*.c) $(wildcard $(SOURCE_DIR)/optionals/hashlib/*.c)
ifeq ($(DISABLE_HTTP), 1)
CFLAGS += -DDISABLE_HTTP
@@ -62,4 +62,10 @@ $(BUILD_DIR)/$(NAME)/%.o: $(SOURCE_DIR)/optionals/%.c $(HEADERS)
@ mkdir -p $(BUILD_DIR)/$(NAME)
@ $(CC) -c $(CFLAGS) -o $@ $<
+# Compile object files.
+$(BUILD_DIR)/$(NAME)/%.o: $(SOURCE_DIR)/optionals/hashlib/%.c $(HEADERS)
+ @ printf "%8s %-40s %s\n" $(CC) $< "$(CFLAGS)"
+ @ mkdir -p $(BUILD_DIR)/$(NAME)
+ @ $(CC) -c $(CFLAGS) -o $@ $<
+
.PHONY: default
