Skip to content

Commit

Permalink
Merge pull request #34 from mkirchner/features/release-cleanup
Browse files Browse the repository at this point in the history
Features/release cleanup
  • Loading branch information
mkirchner committed Jul 10, 2023
2 parents b9e1c2c + 8a4e29a commit 351a2e9
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 313 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 mkirchner
Copyright (c) 2021 Marc Kirchner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 17 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ LIB_SRCS := \
LIB_OBJS := $(LIB_SRCS:%=$(BUILD_DIR)/%.o)
LIB_DEPS := $(LIB_OBJS:.o=.d)

TEST_SRCS := \
TEST_HAMT_SRCS := \
src/murmur3.c \
test/test_hamt.c \
test/utils.c \
test/words.c

TEST_OBJS := $(TEST_SRCS:%=$(BUILD_DIR)/%.o)
TEST_DEPS := $(TEST_OBJS:.o=.d)
TEST_HAMT_OBJS := $(TEST_HAMT_SRCS:%=$(BUILD_DIR)/%.o)
TEST_HAMT_DEPS := $(TEST_HAMT_OBJS:.o=.d)

TEST_MURMUR_SRCS := test/test_murmur.c

TEST_MURMUR_OBJS := $(TEST_MURMUR_SRCS:%=$(BUILD_DIR)/%.o)
TEST_MURMUR_DEPS := $(TEST_MURMUR_OBJS:.o=.d)

CPPFLAGS ?= $(INC_FLAGS) -MMD -MP -g -O0

Expand All @@ -26,11 +31,15 @@ lib: $(BUILD_DIR)/src/libhamt.dylib
$(BUILD_DIR)/src/libhamt.dylib: $(LIB_OBJS)
$(CC) $(LIB_OBJS) -dynamiclib -o $@

test: $(BUILD_DIR)/test/test_hamt
test: $(BUILD_DIR)/test/test_hamt $(BUILD_DIR)/test/test_murmur
$(BUILD_DIR)/test/test_murmur
$(BUILD_DIR)/test/test_hamt

$(BUILD_DIR)/test/test_hamt: $(TEST_OBJS)
$(CC) $(TEST_OBJS) -o $@ $(LDFLAGS)
$(BUILD_DIR)/test/test_hamt: $(TEST_HAMT_OBJS)
$(CC) $(TEST_HAMT_OBJS) -o $@ $(LDFLAGS)

$(BUILD_DIR)/test/test_murmur: $(TEST_MURMUR_OBJS)
$(CC) $(TEST_MURMUR_OBJS) -o $@ $(LDFLAGS)

# c source
$(BUILD_DIR)/%.c.o: %.c
Expand All @@ -43,7 +52,8 @@ clean:
$(RM) -r $(BUILD_DIR)

-include $(LIB_DEPS)
-include $(TEST_DEPS)
-include $(TEST_HAMT_DEPS)
-include $(TEST_MURMUR_DEPS)

MKDIR_P ?= mkdir -p

Loading

0 comments on commit 351a2e9

Please sign in to comment.