Mercurial > msvpvf
changeset 54:76698158a01a
Fix building on macOS
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Sun, 22 May 2022 04:33:17 -0400 |
parents | bc85395ff699 |
children | dbed5f51d635 |
files | Makefile |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 $@