Compare commits

...

5 commits

Author SHA1 Message Date
qikp0
e7eb9ad428
Merge 5c9dede575 into d4e40af550 2026-01-14 00:44:47 +01:00
bravesasha
d4e40af550 Update LICENSE 2026-01-07 03:07:41 -05: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
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,4 @@
Copyright © 2018-2025 GrapheneOS Copyright © 2018-2026 GrapheneOS
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

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