aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-02-09 18:13:20 -0800
committerH. Peter Anvin <hpa@zytor.com>2016-02-09 18:13:20 -0800
commitc7e6d511df730b26336ea2c24020a058aad6be1d (patch)
tree2f85c6f863221d0be304074dc36ad8faf20d5119 /mk
parentf2f897a1762fab84d2905f32b1c15dd7b42abb56 (diff)
downloadsyslinux-c7e6d511df730b26336ea2c24020a058aad6be1d.tar.gz
syslinux-c7e6d511df730b26336ea2c24020a058aad6be1d.tar.xz
syslinux-c7e6d511df730b26336ea2c24020a058aad6be1d.zip
Makefile: make the handling of firmware selection a little saner
Clean up the handling of firmware selection inside the Makefiles. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/com32.mk4
-rw-r--r--mk/elf.mk2
-rw-r--r--mk/embedded.mk2
-rw-r--r--mk/lib.mk2
4 files changed, 4 insertions, 6 deletions
diff --git a/mk/com32.mk b/mk/com32.mk
index d32069dd..aeb8a2cc 100644
--- a/mk/com32.mk
+++ b/mk/com32.mk
@@ -48,7 +48,7 @@ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
-ifdef EFI_BUILD
+ifeq ($(FWCLASS),EFI)
GCCOPT += -mno-red-zone
else
GCCOPT += -mregparm=3 -DREGPARM=3
@@ -119,5 +119,3 @@ C_LNXLIBS = $(com32)/libutil/libutil_lnx.a
%.c32: %.elf
$(OBJCOPY) --strip-debug --strip-unneeded $< $@
- ##$(OBJCOPY) -O binary $< $@
- ##$(RELOCS) $< >> $@ || ( rm -f $@ ; false )
diff --git a/mk/elf.mk b/mk/elf.mk
index 54fd4ce2..b46dbd06 100644
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -60,7 +60,7 @@ CFLAGS = $(GCCOPT) $(GCCWARN) -W -Wall \
-I$(com32)/libutil/include -I$(com32)/include \
-I$(com32)/include/sys $(GPLINCLUDE) -I$(core)/include \
-I$(objdir) -DLDLINUX=\"$(LDLINUX)\"
-ifdef EFI_BUILD
+ifeq ($(FWCLASS),EFI)
GCCOPT += -mno-red-zone
else
GCCOPT += -mregparm=3 -DREGPARM=3
diff --git a/mk/embedded.mk b/mk/embedded.mk
index df8e85f3..488dc0fc 100644
--- a/mk/embedded.mk
+++ b/mk/embedded.mk
@@ -38,7 +38,7 @@ GCCOPT += $(call gcc_ok,-ffreestanding,)
GCCOPT += $(call gcc_ok,-fno-stack-protector,)
GCCOPT += $(call gcc_ok,-fwrapv,)
GCCOPT += $(call gcc_ok,-freg-struct-return,)
-ifdef EFI_BUILD
+ifeq ($(FWCLASS),EFI)
GCCOPT += -Os -fomit-frame-pointer -msoft-float -mno-red-zone
else
GCCOPT += -Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 -msoft-float
diff --git a/mk/lib.mk b/mk/lib.mk
index 7a48756c..54f1fd54 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -54,7 +54,7 @@ WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winl
CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS)
-ifdef EFI_BUILD
+ifeq ($(FWCLASS),EFI)
CFLAGS += -mno-red-zone
else
CFLAGS += -mregparm=3 -DREGPARM=3