-
Notifications
You must be signed in to change notification settings - Fork 9
/
rules.mk
24 lines (21 loc) · 833 Bytes
/
rules.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
include $(TOPDIR)/version.mk
.DEFAULT_GOAL := all
.PHONE: all clean install
%.so: %.o
$(LD) $(LDFLAGS) -o $@ --start-group $^ $(shell $(CC) -print-libgcc-file-name) \
-lgnuefi -lefi $(LIB_TARGET) --end-group
@echo '--------------- List unresolved symbols ---------------'
@! $(NM) $@ | grep -iw u
@echo '-------------------------------------------------------'
%.efi: %.so
$(OBJCOPY) -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel* \
-j .rela* -j .reloc -j .eh_frame \
-j .debug_info -j .debug_abbrev -j .debug_aranges \
-j .debug_line -j .debug_str -j .debug_ranges \
-j .note.gnu.build-id \
$^ $@.debug
$(OBJCOPY) -j .text -j .sdata -j .data -j .data.ident \
-j .dynamic -j .dynsym -j .rel* \
-j .rela* -j .reloc -j .eh_frame \
--target efi-app-$(EFI_ARCH) $^ $@