Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com)
  3. # Licensed under the GPL
  4. #
  5. # pcap is broken in 2.5 because kbuild doesn't allow pcap.a to be linked
  6. # in to pcap.o
  7. slip-objs := slip_kern.o slip_user.o
  8. slirp-objs := slirp_kern.o slirp_user.o
  9. daemon-objs := daemon_kern.o daemon_user.o
  10. umcast-objs := umcast_kern.o umcast_user.o
  11. net-objs := net_kern.o net_user.o
  12. mconsole-objs := mconsole_kern.o mconsole_user.o
  13. hostaudio-objs := hostaudio_kern.o
  14. ubd-objs := ubd_kern.o ubd_user.o
  15. port-objs := port_kern.o port_user.o
  16. harddog-objs := harddog_kern.o harddog_user.o
  17. LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
  18. LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
  19. targets := pcap_kern.o pcap_user.o vde_kern.o vde_user.o
  20. $(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o
  21. $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_pcap.o)
  22. $(obj)/vde.o: $(obj)/vde_kern.o $(obj)/vde_user.o
  23. $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_vde.o)
  24. #XXX: The call below does not work because the flags are added before the
  25. # object name, so nothing from the library gets linked.
  26. #$(call if_changed,ld)
  27. # When the above is fixed, don't forget to add this too!
  28. #targets += $(obj)/pcap.o
  29. obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o
  30. obj-$(CONFIG_SSL) += ssl.o
  31. obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o
  32. obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o
  33. obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o
  34. obj-$(CONFIG_UML_NET_DAEMON) += daemon.o
  35. obj-$(CONFIG_UML_NET_VDE) += vde.o
  36. obj-$(CONFIG_UML_NET_MCAST) += umcast.o
  37. obj-$(CONFIG_UML_NET_PCAP) += pcap.o
  38. obj-$(CONFIG_UML_NET) += net.o
  39. obj-$(CONFIG_MCONSOLE) += mconsole.o
  40. obj-$(CONFIG_MMAPPER) += mmapper_kern.o
  41. obj-$(CONFIG_BLK_DEV_UBD) += ubd.o
  42. obj-$(CONFIG_HOSTAUDIO) += hostaudio.o
  43. obj-$(CONFIG_NULL_CHAN) += null.o
  44. obj-$(CONFIG_PORT_CHAN) += port.o
  45. obj-$(CONFIG_PTY_CHAN) += pty.o
  46. obj-$(CONFIG_TTY_CHAN) += tty.o
  47. obj-$(CONFIG_XTERM_CHAN) += xterm.o xterm_kern.o
  48. obj-$(CONFIG_UML_WATCHDOG) += harddog.o
  49. obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o
  50. obj-$(CONFIG_UML_RANDOM) += random.o
  51. # pcap_user.o must be added explicitly.
  52. USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o
  53. CFLAGS_null.o = -DDEV_NULL=$(DEV_NULL_PATH)
  54. include arch/um/scripts/Makefile.rules