summaryrefslogtreecommitdiffstats
path: root/arch/um/scripts/Makefile.unmap
blob: 802d027a1e13007a12dae1b0a1a329296853c0ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clean-files += unmap_tmp.o unmap_fin.o unmap.o

ifdef CONFIG_MODE_TT

#Always build unmap_fin.o
extra-y += unmap_fin.o
#Do dependency tracking for unmap.o (it will be always built, but won't get the tracking unless we use this).
targets += unmap.o

#XXX: partially copied from arch/um/scripts/Makefile.rules
$(obj)/unmap.o: _c_flags = $(call unprofile,$(CFLAGS))

quiet_cmd_wrapld = LD      $@
define cmd_wrapld
	$(LD) $(LDFLAGS) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) $(CFLAGS) -print-file-name=libc.a); \
	$(OBJCOPY) $(UML_OBJCOPYFLAGS) $(obj)/unmap_tmp.o $@ -G switcheroo
endef

$(obj)/unmap_fin.o : $(obj)/unmap.o FORCE
	$(call if_changed,wrapld)

endif
OpenPOWER on IntegriCloud