1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 21:43:02 +01:00

Use pkg-config for toxcore and toxav

This commit is contained in:
Ansa89 2014-06-23 15:34:32 +02:00
parent b0bfb13241
commit 9f8a6a8b6b

View File

@ -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)
CFLAGS += -D_SUPPORT_AUDIO CHECK_OPENAL = $(shell pkg-config openal || echo -n "no_audio")
LDFLAGS += -ltoxav CHECK_TOXAV = $(shell pkg-config libtoxav || echo -n "no_audio")
OBJ += device.o audio_call.o ifeq (no_audio, $(filter no_audio, $(CHECK_OPENAL) $(CHECK_TOXAV)))
LIBS += openal SUPPORT_AUDIO = 0
else
CFLAGS += -D_SUPPORT_AUDIO
OBJ += device.o audio_call.o
LIBS += openal libtoxav
endif
endif endif
ifneq ($(LIBS),) ifneq ($(LIBS),)