Add v4l tools to build system
This commit is contained in:
parent
3dfaff7df4
commit
f36984db0d
9
Makefile
9
Makefile
@ -11,7 +11,7 @@ DYN_LIB = $(LIB_DIR)/libfloatimg.so
|
||||
|
||||
VERBOSITY = 0
|
||||
|
||||
all: lib funcs tools
|
||||
all: lib funcs tools v4l2
|
||||
|
||||
# shared: $(DYN_LIB)
|
||||
|
||||
@ -28,14 +28,19 @@ funcs: lib
|
||||
gcc -shared $(OBJ_DIR)/*.o -lnetpbm -lpnglite -lcfitsio -ltiff -lz -lm -o $(DYN_LIB)
|
||||
|
||||
|
||||
tools:
|
||||
tools: lib
|
||||
mkdir -p build/bin
|
||||
$(MAKE) -C src/tools
|
||||
|
||||
v4l2:
|
||||
mkdir -p build/bin
|
||||
$(MAKE) -C src/v4l2
|
||||
|
||||
clean:
|
||||
$(MAKE) -C src/lib clean
|
||||
$(MAKE) -C src/funcs clean
|
||||
$(MAKE) -C src/tools clean
|
||||
$(MAKE) -C src/v4l2 clean
|
||||
rm -rf "./build"
|
||||
|
||||
install: all
|
||||
|
@ -1,13 +1,24 @@
|
||||
|
||||
BIN_DIR = ../../build/bin
|
||||
|
||||
STATIC_LIB = ../../build/lib/libfloatimg.a
|
||||
|
||||
COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0
|
||||
DEPS = ../floatimg.h ../libfloatimg.a Makefile
|
||||
|
||||
DEPS = ../floatimg.h $(STATIC_LIB) Makefile
|
||||
|
||||
LOBJ = funcs.o v4l2_pr_structs.o
|
||||
|
||||
all: grabvidseq t video-infos nc-camcontrol
|
||||
EXECUTABLES = $(BIN_DIR)/grabvidseq $(BIN_DIR)/video-infos \
|
||||
$(BIN_DIR)/nc-camcontrol
|
||||
|
||||
all: grabvidseq video-infos nc-camcontrol
|
||||
|
||||
t: t.c Makefile ${DEPS} funcs.o v4l2_pr_structs.o
|
||||
gcc ${COPT} $< funcs.o v4l2_pr_structs.o ../libfloatimg.a -o $@
|
||||
gcc ${COPT} $< funcs.o v4l2_pr_structs.o $(STATIC_LIB) -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(EXECUTABLES) $(LOBJ)
|
||||
|
||||
funcs.o: funcs.c funcs.h Makefile
|
||||
gcc ${COPT} -c $<
|
||||
@ -19,20 +30,20 @@ v4l2_pr_structs.o: v4l2_pr_structs.c v4l2_pr_structs.h Makefile
|
||||
gcc ${COPT} -c $<
|
||||
|
||||
grabvidseq: grabvidseq.c ${DEPS} rgb2fimg.o
|
||||
gcc ${COPT} $< rgb2fimg.o ../libfloatimg.a -lpnglite -lz -lm \
|
||||
-lcfitsio -lv4l2 -ltiff -o $@
|
||||
gcc ${COPT} $< rgb2fimg.o $(STATIC_LIB) -lpnglite -lz -lm \
|
||||
-lcfitsio -lv4l2 -ltiff -o $(BIN_DIR)/$@
|
||||
|
||||
video-infos: video-infos.c Makefile funcs.o v4l2_pr_structs.o
|
||||
gcc -Wall -g $< ${LOBJ} ../libfloatimg.a -o $@
|
||||
gcc -Wall -g $< ${LOBJ} $(STATIC_LIB) -o $(BIN_DIR)/$@
|
||||
|
||||
nc-camcontrol: nc-camcontrol.c Makefile funcs.o v4l2_pr_structs.o
|
||||
gcc -Wall -g $< ${LOBJ} ../libfloatimg.a -lcurses -o $@
|
||||
gcc -Wall -g $< ${LOBJ} $(STATIC_LIB) -lcurses -o $(BIN_DIR)/$@
|
||||
|
||||
# ---------------
|
||||
# external things
|
||||
|
||||
capture: capture.c Makefile
|
||||
gcc -Wall -g $< -o $@
|
||||
gcc -Wall -g $< o $(BIN_DIR)$@
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user