aboutsummaryrefslogtreecommitdiffstats
path: root/mk/elf.mk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-02-27 21:43:18 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-02-27 21:43:54 -0800
commit929b217f46ac45cc0bf7cbbaf77575ad0a17f94f (patch)
treea7768c2a5c034fda581609dd59c4b6acd5f4dba2 /mk/elf.mk
parent2702e0bdb70c4b6de530ad2205858154e47f2b33 (diff)
downloadsyslinux-929b217f46ac45cc0bf7cbbaf77575ad0a17f94f.tar.gz
syslinux-929b217f46ac45cc0bf7cbbaf77575ad0a17f94f.tar.xz
syslinux-929b217f46ac45cc0bf7cbbaf77575ad0a17f94f.zip
Makefiles: export the firmware type as a cpp variable
Export the firmware type as a cpp variable so we can #ifdef. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'mk/elf.mk')
-rw-r--r--mk/elf.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/elf.mk b/mk/elf.mk
index 56de6de0..12d10778 100644
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -55,7 +55,7 @@ GPLINCLUDE =
endif
CFLAGS = $(GCCOPT) $(GCCWARN) -W -Wall \
- -fomit-frame-pointer -D__COM32__ -DDYNAMIC_MODULE \
+ -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ -DDYNAMIC_MODULE \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include \
-I$(com32)/include/sys $(GPLINCLUDE) -I$(core)/include \
@@ -64,7 +64,7 @@ ifndef EFI_BUILD
CFLAGS += -mregparm=3 -DREGPARM=3
endif
-SFLAGS = $(GCCOPT) -D__COM32__
+SFLAGS = $(GCCOPT) -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__
LDFLAGS = -m elf_$(ARCH) -shared --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld --as-needed
LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc)