diff --git a/apps/mstpcrc/Makefile b/apps/mstpcrc/Makefile index c445a934..66147b7b 100644 --- a/apps/mstpcrc/Makefile +++ b/apps/mstpcrc/Makefile @@ -21,7 +21,11 @@ LFLAGS += -Wl,$(BACNET_LIB) endif # GCC dead code removal CFLAGS += -ffunction-sections -fdata-sections +ifeq ($(shell uname -s),Darwin) +LFLAGS += -Wl,-dead_strip +else LFLAGS += -Wl,--gc-sections +endif OBJS += ${SRCS:.c=.o}