2 # Jailhouse, a Linux-based partitioning hypervisor
4 # Copyright (c) Siemens AG, 2015
7 # Jan Kiszka <jan.kiszka@siemens.com>
9 # This work is licensed under the terms of the GNU GPL, version 2. See
10 # the COPYING file in the top-level directory.
13 always := lib.a lib32.a
15 TARGETS := header.o hypercall.o ioapic.o printk.o
16 TARGETS_64_ONLY := int.o mem.o pci.o timing.o
18 lib-y := $(TARGETS) $(TARGETS_64_ONLY)
20 lib32-y := $(addprefix $(obj)/,$(TARGETS:.o=-32.o))
22 quiet_cmd_link_archive32 = AR $@
23 cmd_link_archive32 = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@ $(lib32-y)
25 $(obj)/lib32.a: $(lib32-y)
26 $(call if_changed,link_archive32)
28 AFLAGS_header-32.o := -m32
29 targets += header-32.o
31 $(obj)/%-32.o: c_flags += -m32
32 $(obj)/%-32.o: $(src)/%.c
33 $(call if_changed_rule,cc_o_c)