Skip to content

Commit 8887312

Browse files
committed
ccid: build smartcard as module
Drops libcacard.so dependency from core qemu. Signed-off-by: Gerd Hoffmann <[email protected]> Message-id: [email protected]
1 parent c4ddab7 commit 8887312

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

Makefile.objs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ common-obj-y += migration/
5959
common-obj-y += audio/
6060
common-obj-m += audio/
6161
common-obj-y += hw/
62+
common-obj-m += hw/
6263

6364
common-obj-y += replay/
6465

hw/Makefile.objs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ devices-dirs-y += smbios/
4343
endif
4444

4545
common-obj-y += $(devices-dirs-y)
46+
common-obj-m += usb/
4647
obj-y += $(devices-dirs-y)

hw/usb/Makefile.objs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ common-obj-$(CONFIG_USB_NETWORK) += dev-network.o
2929

3030
ifeq ($(CONFIG_USB_SMARTCARD),y)
3131
common-obj-y += dev-smartcard-reader.o
32-
common-obj-$(CONFIG_SMARTCARD) += smartcard.mo
32+
ifeq ($(CONFIG_SMARTCARD),y)
33+
common-obj-m += smartcard.mo
3334
smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o
3435
smartcard.mo-cflags := $(SMARTCARD_CFLAGS)
3536
smartcard.mo-libs := $(SMARTCARD_LIBS)
3637
endif
38+
endif
3739

3840
ifeq ($(CONFIG_POSIX),y)
3941
common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o

util/module.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ static struct {
261261
const char *prefix;
262262
const char *module;
263263
} const qom_modules[] = {
264+
{ "ccid-card-passthru", "hw-", "usb-smartcard" },
265+
{ "ccid-card-emulated", "hw-", "usb-smartcard" },
264266
};
265267

266268
static bool module_loaded_qom_all;

0 commit comments

Comments
 (0)