Skip to content

Commit 34cbe66

Browse files
committed
Make library set system dependent
For instance, FreeBSD doesn't need -lresolv, -ldl
1 parent c943d2e commit 34cbe66

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
UNAME_S := $(shell uname -s)
2+
13
CFLAGS += $(shell pkg-config --cflags freetype2 x11 openal)
24
CFLAGS += $(shell pkg-config --cflags dbus-1)
35
CFLAGS += -g -pthread -std=gnu99
46
LDFLAGS += $(shell pkg-config --libs freetype2 x11 openal)
57
LDFLAGS += $(shell pkg-config --libs dbus-1)
6-
LDFLAGS += -lX11 -lXft -lXrender -ltoxcore -ltoxav -ltoxdns -lopenal -pthread -lresolv -ldl -lm -lfontconfig -lv4lconvert -lvpx -lXext
8+
LDFLAGS += -lX11 -lXft -lXrender -ltoxcore -ltoxav -ltoxdns -lopenal -pthread -lm -lfontconfig -lv4lconvert -lvpx -lXext
9+
10+
ifeq ($(UNAME_S),Linux)
11+
LDFLAGS += -lresolv -ldl
12+
endif
713

814
DESTDIR?= # empty
915
PREFIX?= /usr/local

0 commit comments

Comments
 (0)