-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·32 lines (24 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
SRCDIR ?= /opt/fpp/src
include $(SRCDIR)/makefiles/common/setup.mk
include $(SRCDIR)/makefiles/platform/*.mk
all: libfpp-VideoCapture.$(SHLIB_EXT)
debug: all
CFLAGS+=-I.
ifeq "1" "1"
OBJECTS_fpp_VideoCapture_so += src/FPP-VideoCapture.o src/IPVideoCaptureEffect.o
LIBS_fpp_VideoCapture_so += -L$(SRCDIR) -lfpp -ljsoncpp -lswscale -lavformat -lavutil -lavcodec -lhttpserver
ifneq '$(ARCH)' 'OSX'
OBJECTS_fpp_VideoCapture_so += src/V4LVideoCaptureEffect.o
LIBS_fpp_VideoCapture_so += -lv4l2
endif
else
OBJECTS_fpp_VideoCapture_so += src/FPP-VideoCapture.o src/LibCameraVideoCaptureEffect.o src/IPVideoCaptureEffect.o
LIBS_fpp_VideoCapture_so += -L$(SRCDIR) -lfpp -lcamera -ljsoncpp -lswscale -lavformat -lavutil
CXXFLAGS_src/LibCameraVideoCaptureEffect.o += -I$(SRCDIR) -I/usr/include/libcamera
endif
%.o: %.cpp Makefile
$(CCACHE) $(CC) $(CFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) -c $< -o $@
libfpp-VideoCapture.$(SHLIB_EXT): $(OBJECTS_fpp_VideoCapture_so) $(SRCDIR)/libfpp.$(SHLIB_EXT)
$(CCACHE) $(CC) -shared $(CFLAGS_$@) $(OBJECTS_fpp_VideoCapture_so) $(LIBS_fpp_VideoCapture_so) $(LDFLAGS) -o $@
clean:
rm -f libfpp-VideoCapture.$(SHLIB_EXT) $(OBJECTS_fpp_VideoCapture_so)