mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 15:53:26 +01:00
Use pkg-config for toxcore and toxav
This commit is contained in:
parent
b0bfb13241
commit
9f8a6a8b6b
13
src/Makefile
13
src/Makefile
@ -1,9 +1,9 @@
|
|||||||
SUPPORT_AUDIO ?= 0
|
SUPPORT_AUDIO ?= 0
|
||||||
|
|
||||||
LIBS = ncurses
|
LIBS = libtoxcore ncurses
|
||||||
|
|
||||||
CFLAGS = -std=gnu99 -pthread
|
CFLAGS = -std=gnu99 -pthread
|
||||||
LDFLAGS = -ltoxcore -ltoxdns -ldl -lresolv
|
LDFLAGS = -ldl -lresolv
|
||||||
DESTDIR=/usr/local
|
DESTDIR=/usr/local
|
||||||
|
|
||||||
OBJ = chat.o chat_commands.o configdir.o dns.o execute.o
|
OBJ = chat.o chat_commands.o configdir.o dns.o execute.o
|
||||||
@ -11,10 +11,15 @@ OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o
|
|||||||
OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o
|
OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o
|
||||||
|
|
||||||
ifeq ($(SUPPORT_AUDIO), 1)
|
ifeq ($(SUPPORT_AUDIO), 1)
|
||||||
|
CHECK_OPENAL = $(shell pkg-config openal || echo -n "no_audio")
|
||||||
|
CHECK_TOXAV = $(shell pkg-config libtoxav || echo -n "no_audio")
|
||||||
|
ifeq (no_audio, $(filter no_audio, $(CHECK_OPENAL) $(CHECK_TOXAV)))
|
||||||
|
SUPPORT_AUDIO = 0
|
||||||
|
else
|
||||||
CFLAGS += -D_SUPPORT_AUDIO
|
CFLAGS += -D_SUPPORT_AUDIO
|
||||||
LDFLAGS += -ltoxav
|
|
||||||
OBJ += device.o audio_call.o
|
OBJ += device.o audio_call.o
|
||||||
LIBS += openal
|
LIBS += openal libtoxav
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(LIBS),)
|
ifneq ($(LIBS),)
|
||||||
|
Loading…
Reference in New Issue
Block a user