summaryrefslogtreecommitdiff
path: root/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
parent2702e0bdb70c4b6de530ad2205858154e47f2b33 (diff)
downloadsyslinux-929b217f46ac45cc0bf7cbbaf77575ad0a17f94f.tar.gz
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')
-rw-r--r--mk/com32.mk4
-rw-r--r--mk/efi.mk4
-rw-r--r--mk/elf.mk4
-rw-r--r--mk/lib.mk2
-rw-r--r--mk/rosh.mk2
5 files changed, 8 insertions, 8 deletions
diff --git a/mk/com32.mk b/mk/com32.mk
index 55dc10c2..9a3b19d3 100644
--- a/mk/com32.mk
+++ b/mk/com32.mk
@@ -64,12 +64,12 @@ GPLINCLUDE =
endif
CFLAGS = $(GCCOPT) $(GCCWARN) \
- -fomit-frame-pointer -D__COM32__ \
+ -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include \
-I$(com32)/include/sys $(GPLINCLUDE)
SFLAGS = $(GCCOPT) $(GCCWARN) \
- -fomit-frame-pointer -D__COM32__ \
+ -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include \
-I$(com32)/include/sys $(GPLINCLUDE)
diff --git a/mk/efi.mk b/mk/efi.mk
index f90ce5c5..f097ad22 100644
--- a/mk/efi.mk
+++ b/mk/efi.mk
@@ -29,7 +29,7 @@ CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(EFI_SUBARCH) \
-I$(core)/include -I$(core)/ $(ARCHOPT) \
-I$(com32)/lib/ -I$(com32)/libutil/include -std=gnu99 \
-DELF_DEBUG -DSYSLINUX_EFI -I$(objdir) \
- $(GCCWARN) -D__COM32__ -mno-red-zone \
+ $(GCCWARN) -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ -mno-red-zone \
-DLDLINUX=\"$(LDLINUX)\" -fvisibility=hidden \
-Wno-unused-parameter $(GCCOPT)
@@ -40,7 +40,7 @@ LDFLAGS = -T $(SRC)/$(ARCH)/syslinux.ld -Bsymbolic -pie -nostdlib -znocombreloc
-L$(LIBDIR) --hash-style=gnu -m elf_$(ARCH) $(CRT0) -E
SFLAGS = $(GCCOPT) $(GCCWARN) $(ARCHOPT) \
- -fomit-frame-pointer -D__COM32__ \
+ -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include -I$(com32)/include/sys $(GPLINCLUDE)
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)
diff --git a/mk/lib.mk b/mk/lib.mk
index bc516c2c..a12a0595 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -43,7 +43,7 @@ LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \
# fallback anyway, just use that on old machines...
# LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED
-REQFLAGS = $(GCCOPT) -g -D__COM32__ \
+REQFLAGS = $(GCCOPT) -g -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-nostdinc -iwithprefix include -I. -I$(SRC)/sys \
-I$(SRC)/../include -I$(com32)/include/sys \
-I$(topdir)/core/include -I$(com32)/lib/ \
diff --git a/mk/rosh.mk b/mk/rosh.mk
index 45b98213..68693488 100644
--- a/mk/rosh.mk
+++ b/mk/rosh.mk
@@ -18,7 +18,7 @@
include $(MAKEDIR)/elf.mk
# CFLAGS = $(GCCOPT) $(GCCWARN) -march=i386 \
-# -fomit-frame-pointer -D__COM32__ \
+# -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
# -nostdinc -iwithprefix include \
# -I$(com32)/libutil/include -I$(com32)/include
# -g3 -dD