Don't use a wildcard in Makefile if you are going to overwrite it
@@ -60,7 +60,7 @@ OUTPUT_NAME = $(shell basename $(PROJECT))
SDL_LIBS = `sdl2-config --libs`
# Glom all .cpp files from the testbed
-TESTBED_SRC_FILES := $(wildcard $(TESTBED)/*.cpp)
+TESTBED_SRC_FILES := $(TESTBED)/Main.cpp
# Glom all .cpp files from our desired project
PROJECT_SRC_FILES := $(wildcard $(PROJECT)/*.cpp)
@@ -74,10 +74,10 @@ ifeq ($(ENABLE_FFMPEG), true)
FFMPEG_LIBS = -Wl,-Bstatic -lavformat -lavcodec -lavdevice -lavfilter -lavutil -lswresample -lswscale -Wl,-Bdynamic -llzma -lz
LDFLAGS += -L$(FFMPEG)/lib $(FFMPEG_LIBS)
CPPFLAGS += -I$(FFMPEG)/include
+TESTBED_SRC_FILES += $(TESTBED)/VideoCapture.cpp
else
FFMPEG_LIBS =
CPPFLAGS += -DNO_FFMPEG_CAPTURE
-TESTBED_SRC_FILES = $(TESTBED)/Main.cpp
endif
LDFLAGS += $(SDL_LIBS) -lpthread
