Browse Source

[efi] Minimise use of iPXE header files when building host utilities

Avoid dragging in unnecessary iPXE header files such as <ipxe/uuid.h>
and <ipxe/tables.h> when building host utilities, and ensure that
FILE_LICENCE() (present in the imported EDK2 headers) expands to a
no-op.

Reported-by: Michael Tautschnig <mt@debian.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
fdad22a1ed
3 changed files with 6 additions and 3 deletions
  1. 2
    1
      src/util/efifatbin.c
  2. 2
    1
      src/util/efirom.c
  3. 2
    1
      src/util/elf2efi.c

+ 2
- 1
src/util/efifatbin.c View File

@@ -17,6 +17,7 @@
17 17
  * 02110-1301, USA.
18 18
  */
19 19
 
20
+#define FILE_LICENCE(...) extern void __file_licence ( void )
20 21
 #include <stdint.h>
21 22
 #include <stddef.h>
22 23
 #include <stdlib.h>
@@ -27,7 +28,7 @@
27 28
 #include <errno.h>
28 29
 #include <assert.h>
29 30
 #include <getopt.h>
30
-#include <ipxe/efi/efi.h>
31
+#include <ipxe/efi/Uefi.h>
31 32
 #include <ipxe/efi/IndustryStandard/PeImage.h>
32 33
 
33 34
 #define eprintf(...) fprintf ( stderr, __VA_ARGS__ )

+ 2
- 1
src/util/efirom.c View File

@@ -17,6 +17,7 @@
17 17
  * 02110-1301, USA.
18 18
  */
19 19
 
20
+#define FILE_LICENCE(...) extern void __file_licence ( void )
20 21
 #include <stdint.h>
21 22
 #include <stddef.h>
22 23
 #include <stdlib.h>
@@ -27,7 +28,7 @@
27 28
 #include <errno.h>
28 29
 #include <assert.h>
29 30
 #include <getopt.h>
30
-#include <ipxe/efi/efi.h>
31
+#include <ipxe/efi/Uefi.h>
31 32
 #include <ipxe/efi/IndustryStandard/PeImage.h>
32 33
 #include <ipxe/efi/IndustryStandard/Pci22.h>
33 34
 

+ 2
- 1
src/util/elf2efi.c View File

@@ -20,6 +20,7 @@
20 20
 #define _GNU_SOURCE
21 21
 #define PACKAGE "elf2efi"
22 22
 #define PACKAGE_VERSION "1"
23
+#define FILE_LICENCE(...) extern void __file_licence ( void )
23 24
 #include <stdint.h>
24 25
 #include <stddef.h>
25 26
 #include <stdlib.h>
@@ -30,7 +31,7 @@
30 31
 #include <assert.h>
31 32
 #include <getopt.h>
32 33
 #include <bfd.h>
33
-#include <ipxe/efi/efi.h>
34
+#include <ipxe/efi/Uefi.h>
34 35
 #include <ipxe/efi/IndustryStandard/PeImage.h>
35 36
 #include <libgen.h>
36 37
 

Loading…
Cancel
Save