Compare commits

...

4 commits

Author SHA1 Message Date
qikp0
6a4a9d5c90
Merge 5c9dede575 into c110ba88f3 2025-11-20 20:55:33 +01:00
Charles
5c9dede575 Use $(AR) 2025-11-15 22:12:13 +00:00
Charles
1f40535cec Also remove static library when cleaning 2025-11-15 22:12:13 +00:00
Charles
a22f5f911b Add an option to build a static library 2025-11-15 22:12:13 +00:00

View file

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