Compare commits

...

4 commits

Author SHA1 Message Date
charles25565
7c9b69163b
Merge 7844b354a5 into 5cb0ff9f4d 2025-10-29 17:14:10 -04:00
Charles
7844b354a5 Use $(AR) 2025-10-29 13:44:26 -04:00
Charles
45487891f1 Also remove static library when cleaning 2025-09-25 15:24:40 -04:00
Charles
51e8ffe080 Add an option to build a static library 2025-09-25 15:12:11 -04:00

View file

@ -110,6 +110,9 @@ CPPFLAGS += \
-DCONFIG_STATS=$(CONFIG_STATS) \
-DCONFIG_SELF_INIT=$(CONFIG_SELF_INIT)
$(OUT)/libhardened_malloc$(SUFFIX).a: $(OBJECTS) | $(OUT)
$(AR) rcs $@ $^
$(OUT)/libhardened_malloc$(SUFFIX).so: $(OBJECTS) | $(OUT)
$(CC) $(CFLAGS) $(LDFLAGS) -shared $^ $(LDLIBS) -o $@
@ -138,7 +141,7 @@ tidy:
clang-tidy --extra-arg=-std=c++17 $(filter %.cc,$(SOURCES)) -- $(CPPFLAGS)
clean:
rm -f $(OUT)/libhardened_malloc.so $(OBJECTS)
rm -f $(OUT)/libhardened_malloc.so $(OUT)/libhardened_malloc.a $(OBJECTS)
$(MAKE) -C test/ clean
test: $(OUT)/libhardened_malloc$(SUFFIX).so