Skip to content

Commit 1e72b61

Browse files
committed
Fix build flags for unit in darwin
1 parent 659b396 commit 1e72b61

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ asan:LDFLAGS+=-static-libasan
110110

111111
# Test
112112

113-
unit:LDFLAGS+=-lcheck -lm -lpthread -lrt -ldl -lsubunit
113+
UNIT_LIBS=-lcheck -lm -lpthread -lrt -ldl -lsubunit
114+
ifeq ($(UNAME_S),Darwin)
115+
UNIT_LIBS=-lcheck -lm -lpthread
116+
endif
117+
118+
unit:LDFLAGS+=$(UNIT_LIBS)
114119
build/test-evloop: $(OBJ) build/test/test_eventloop.o
115120
@echo "[LD] $@"
116121
@$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BEGIN_GROUP) $(^) $(END_GROUP)

0 commit comments

Comments
 (0)