Make DRIVER=xyz will compile only driver_xyz.cc and skip the other driver_...cc files.

pull/480/head
Fredrik Öhrström 2022-02-17 20:42:20 +01:00
rodzic 3468bb9ffe
commit 9b131f15c4
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -135,11 +135,14 @@ PROG_OBJS:=\
$(BUILD)/wmbus_rc1180.o \
$(BUILD)/wmbus_utils.o \
# If you run: "make DRIVER=minomess" then only driver_minomess.cc will be compiled into wmbusmeters.
# The old style drivers meter_xyz.cc must always be compiled in, but eventually they will be gone.
ifeq ($(DRIVER),)
DRIVER_OBJS:=$(wildcard src/meter_*.cc) $(wildcard src/driver_*.cc)
else
$(info Building a single driver $(DRIVER))
DRIVER_OBJS:=src/meter_auto.cc src/meter_unknown.cc src/meter_$(DRIVER).cc
DRIVER_OBJS:=src/driver_auto.cc src/driver_unknown.cc $(wildcard src/meter_*.cc) src/driver_$(DRIVER).cc
endif
DRIVER_OBJS:=$(patsubst src/%.cc,$(BUILD)/%.o,$(DRIVER_OBJS))