mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-27 01:43:28 +01:00
22 lines
818 B
Makefile
22 lines
818 B
Makefile
# Variables for video call support
|
|
VIDEO_LIBS = openal 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
|