# HG changeset patch # User Paper <37962225+mrpapersonic@users.noreply.github.com> # Date 1653208397 14400 # Node ID 76698158a01a06160b5fc8457b894dd221c91755 # Parent bc85395ff699f8f13a5c1aad703f46928f6c3aa6 Fix building on macOS diff -r bc85395ff699 -r 76698158a01a Makefile --- a/Makefile Sun May 22 04:27:55 2022 -0400 +++ b/Makefile Sun May 22 04:33:17 2022 -0400 @@ -1,5 +1,11 @@ CC_FLAGS=-Wall -O2 -fstack-protector -fdata-sections -ffunction-sections -LD_FLAGS=-Wl,--gc-sections +LD_FLAGS= + +ifeq ($(UNAME_S),Darwin) # macOS is the odd one... + LD_FLAGS+=-Wl,-dead_strip +else + LD_FLAGS+=-Wl,--gc-sections +endif src/%.o : src/%.c $(CC) -c $(CC_FLAGS) $< -o $@