- Add 'force' phony prerequisite to all sub-make delegation rules in dev/cli/Makefile and src/node/Makefile so the sub-make is always invoked and can check source timestamps itself; previously a stale .o would never be rebuilt by a dependent Makefile - Move stream_stats_record_frame inside the successful send branch in on_ingest_frame so stats reflect actual delivered frames rather than capture throughput; avoids misleading Mbps readings when the transport is disconnected Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
52 lines
1.9 KiB
Makefile
52 lines
1.9 KiB
Makefile
ROOT := $(abspath ../..)
|
|
include $(ROOT)/common.mk
|
|
|
|
NODE_BUILD = $(BUILD)/node
|
|
MAIN_OBJ = $(NODE_BUILD)/main.o
|
|
COMMON_OBJ = $(BUILD)/common/error.o
|
|
MEDIA_OBJ = $(BUILD)/media_ctrl/media_ctrl.o
|
|
V4L2_OBJ = $(BUILD)/v4l2_ctrl/v4l2_ctrl.o
|
|
SERIAL_OBJ = $(BUILD)/serial/serial.o
|
|
TRANSPORT_OBJ = $(BUILD)/transport/transport.o
|
|
DISCOVERY_OBJ = $(BUILD)/discovery/discovery.o
|
|
CONFIG_OBJ = $(BUILD)/config/config.o
|
|
PROTOCOL_OBJ = $(BUILD)/protocol/protocol.o
|
|
RECONCILER_OBJ = $(BUILD)/reconciler/reconciler.o
|
|
INGEST_OBJ = $(BUILD)/ingest/ingest.o
|
|
XORG_OBJ = $(BUILD)/xorg/xorg.o
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(NODE_BUILD)/video-node
|
|
|
|
$(NODE_BUILD)/video-node: $(MAIN_OBJ) \
|
|
$(COMMON_OBJ) $(MEDIA_OBJ) $(V4L2_OBJ) $(SERIAL_OBJ) \
|
|
$(TRANSPORT_OBJ) $(DISCOVERY_OBJ) $(CONFIG_OBJ) $(PROTOCOL_OBJ) \
|
|
$(RECONCILER_OBJ) $(INGEST_OBJ) $(XORG_OBJ)
|
|
$(CC) $(CFLAGS) -o $@ $^ -lpthread $(PKG_LDFLAGS)
|
|
|
|
$(MAIN_OBJ): main.c | $(NODE_BUILD)
|
|
$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
|
|
# 'force' ensures the sub-make is always invoked so it can check source timestamps itself.
|
|
.PHONY: force
|
|
$(COMMON_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/common
|
|
$(MEDIA_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/media_ctrl
|
|
$(V4L2_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/v4l2_ctrl
|
|
$(SERIAL_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/serial
|
|
$(TRANSPORT_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/transport
|
|
$(DISCOVERY_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/discovery
|
|
$(CONFIG_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/config
|
|
$(PROTOCOL_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/protocol
|
|
$(RECONCILER_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/reconciler
|
|
$(INGEST_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/ingest
|
|
$(XORG_OBJ): force ; $(MAKE) -C $(ROOT)/src/modules/xorg
|
|
|
|
$(NODE_BUILD):
|
|
mkdir -p $@
|
|
|
|
clean:
|
|
rm -f $(NODE_BUILD)/video-node $(MAIN_OBJ) $(NODE_BUILD)/main.d
|
|
|
|
-include $(NODE_BUILD)/main.d
|