1dbddf429SAlex Dewar# SPDX-License-Identifier: GPL-2.0 21da177e4SLinus Torvalds# 31da177e4SLinus Torvalds# Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com) 41da177e4SLinus Torvalds# 51da177e4SLinus Torvalds 61da177e4SLinus Torvalds# pcap is broken in 2.5 because kbuild doesn't allow pcap.a to be linked 71da177e4SLinus Torvalds# in to pcap.o 81da177e4SLinus Torvalds 91da177e4SLinus Torvaldsslip-objs := slip_kern.o slip_user.o 101da177e4SLinus Torvaldsslirp-objs := slirp_kern.o slirp_user.o 111da177e4SLinus Torvaldsdaemon-objs := daemon_kern.o daemon_user.o 1249da7e64SAnton Ivanovvector-objs := vector_kern.o vector_user.o vector_transports.o 134ff4d8d3SNolan Leakeumcast-objs := umcast_kern.o umcast_user.o 141da177e4SLinus Torvaldsnet-objs := net_kern.o net_user.o 151da177e4SLinus Torvaldsmconsole-objs := mconsole_kern.o mconsole_user.o 161da177e4SLinus Torvaldshostaudio-objs := hostaudio_kern.o 1791acb21fSJeff Dikeubd-objs := ubd_kern.o ubd_user.o 181da177e4SLinus Torvaldsport-objs := port_kern.o port_user.o 19*73a23d77SJohannes Bergharddog-objs := harddog_kern.o 20*73a23d77SJohannes Bergharddog-builtin-$(CONFIG_UML_WATCHDOG) := harddog_user.o harddog_user_exp.o 21dde8b58dSJohannes Bergrtc-objs := rtc_kern.o rtc_user.o 221da177e4SLinus Torvalds 237e49afc0SMasahiro YamadaLDFLAGS_pcap.o = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a) 24ecc354a9SPaolo 'Blaisorblade' Giarrusso 257e49afc0SMasahiro YamadaLDFLAGS_vde.o = $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) 26ad43c356SJeff Dike 27ad43c356SJeff Diketargets := pcap_kern.o pcap_user.o vde_kern.o vde_user.o 288afe07ceSPaolo 'Blaisorblade' Giarrusso 29ecc354a9SPaolo 'Blaisorblade' Giarrusso$(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o 302fb9279fSMasahiro Yamada $(LD) -r -dp -o $@ $^ $(ld_flags) 31ad43c356SJeff Dike 32ad43c356SJeff Dike$(obj)/vde.o: $(obj)/vde_kern.o $(obj)/vde_user.o 332fb9279fSMasahiro Yamada $(LD) -r -dp -o $@ $^ $(ld_flags) 34ad43c356SJeff Dike 35ecc354a9SPaolo 'Blaisorblade' Giarrusso#XXX: The call below does not work because the flags are added before the 36ecc354a9SPaolo 'Blaisorblade' Giarrusso# object name, so nothing from the library gets linked. 37ecc354a9SPaolo 'Blaisorblade' Giarrusso#$(call if_changed,ld) 38ecc354a9SPaolo 'Blaisorblade' Giarrusso 39ecc354a9SPaolo 'Blaisorblade' Giarrusso# When the above is fixed, don't forget to add this too! 408afe07ceSPaolo 'Blaisorblade' Giarrusso#targets += $(obj)/pcap.o 41ecc354a9SPaolo 'Blaisorblade' Giarrusso 421da177e4SLinus Torvaldsobj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o 431da177e4SLinus Torvaldsobj-$(CONFIG_SSL) += ssl.o 441da177e4SLinus Torvaldsobj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o 451da177e4SLinus Torvalds 46a3c77c67SJeff Dikeobj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o 47a3c77c67SJeff Dikeobj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o 481da177e4SLinus Torvaldsobj-$(CONFIG_UML_NET_DAEMON) += daemon.o 4949da7e64SAnton Ivanovobj-$(CONFIG_UML_NET_VECTOR) += vector.o 50ad43c356SJeff Dikeobj-$(CONFIG_UML_NET_VDE) += vde.o 514ff4d8d3SNolan Leakeobj-$(CONFIG_UML_NET_MCAST) += umcast.o 52ecc354a9SPaolo 'Blaisorblade' Giarrussoobj-$(CONFIG_UML_NET_PCAP) += pcap.o 531da177e4SLinus Torvaldsobj-$(CONFIG_UML_NET) += net.o 541da177e4SLinus Torvaldsobj-$(CONFIG_MCONSOLE) += mconsole.o 551da177e4SLinus Torvaldsobj-$(CONFIG_MMAPPER) += mmapper_kern.o 561da177e4SLinus Torvaldsobj-$(CONFIG_BLK_DEV_UBD) += ubd.o 571da177e4SLinus Torvaldsobj-$(CONFIG_HOSTAUDIO) += hostaudio.o 581da177e4SLinus Torvaldsobj-$(CONFIG_NULL_CHAN) += null.o 591da177e4SLinus Torvaldsobj-$(CONFIG_PORT_CHAN) += port.o 601da177e4SLinus Torvaldsobj-$(CONFIG_PTY_CHAN) += pty.o 611da177e4SLinus Torvaldsobj-$(CONFIG_TTY_CHAN) += tty.o 621da177e4SLinus Torvaldsobj-$(CONFIG_XTERM_CHAN) += xterm.o xterm_kern.o 631da177e4SLinus Torvaldsobj-$(CONFIG_UML_WATCHDOG) += harddog.o 64*73a23d77SJohannes Bergobj-y += $(harddog-builtin-y) $(harddog-builtin-m) 651da177e4SLinus Torvaldsobj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o 661da177e4SLinus Torvaldsobj-$(CONFIG_UML_RANDOM) += random.o 675d38f324SErel Geronobj-$(CONFIG_VIRTIO_UML) += virtio_uml.o 68dde8b58dSJohannes Bergobj-$(CONFIG_UML_RTC) += rtc.o 6968f5d3f3SJohannes Bergobj-$(CONFIG_UML_PCI_OVER_VIRTIO) += virt-pci.o 701da177e4SLinus Torvalds 71ecc354a9SPaolo 'Blaisorblade' Giarrusso# pcap_user.o must be added explicitly. 7249da7e64SAnton IvanovUSER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o vector_user.o 73ec82c32dSAl ViroCFLAGS_null.o = -DDEV_NULL=$(DEV_NULL_PATH) 741da177e4SLinus Torvalds 7516aa835aSJohannes BergCFLAGS_xterm.o += '-DCONFIG_XTERM_CHAN_DEFAULT_EMULATOR="$(CONFIG_XTERM_CHAN_DEFAULT_EMULATOR)"' 7616aa835aSJohannes Berg 7767d7c302SMasahiro Yamadainclude $(srctree)/arch/um/scripts/Makefile.rules 78