mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-30 04:53:27 +01:00
21 lines
813 B
Makefile
21 lines
813 B
Makefile
|
# Variables for video call support
|
||
|
VIDEO_LIBS = libtoxav vpx x11
|
||
|
VIDEO_CFLAGS = -DVIDEO
|
||
|
ifneq (, $(findstring video_device.o, $(OBJ)))
|
||
|
VIDEO_OBJ = video_call.o
|
||
|
else
|
||
|
VIDEO_OBJ = video_call.o video_device.o
|
||
|
endif
|
||
|
|
||
|
# Check if we can build video support
|
||
|
CHECK_VIDEO_LIBS = $(shell pkg-config --exists $(VIDEO_LIBS) || echo -n "error")
|
||
|
ifneq ($(CHECK_VIDEO_LIBS), error)
|
||
|
LIBS += $(VIDEO_LIBS)
|
||
|
CFLAGS += $(VIDEO_CFLAGS)
|
||
|
OBJ += $(VIDEO_OBJ)
|
||
|
else ifneq ($(MAKECMDGOALS), clean)
|
||
|
MISSING_VIDEO_LIBS = $(shell for lib in $(VIDEO_LIBS) ; do if ! pkg-config --exists $$lib ; then echo $$lib ; fi ; done)
|
||
|
$(warning WARNING -- Toxic will be compiled without video support)
|
||
|
$(warning WARNING -- You will need these libraries for video support)
|
||
|
$(warning WARNING -- $(MISSING_VIDEO_LIBS))
|
||
|
endif
|