aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-01-29 14:01:07 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-01-29 15:11:28 +0000
commitbf20364b582c383b4927f898de213b1cc0981a80 (patch)
tree5412e0c14cf74df0d7ea29ff182e23d3281aac3e /mk
parentafd985f6eec18a0f66a8fc55f9c5e3431128310f (diff)
parenta2d79191b501276026a0a16ec2fa664630a20476 (diff)
downloadsyslinux-bf20364b582c383b4927f898de213b1cc0981a80.tar.gz
syslinux-bf20364b582c383b4927f898de213b1cc0981a80.tar.xz
syslinux-bf20364b582c383b4927f898de213b1cc0981a80.zip
Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4
Conflicts: Makefile NEWS com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/gfxboot/Makefile com32/gpllib/Makefile com32/include/sys/module.h com32/lib/Makefile com32/lib/sys/module/elf_module.c com32/menu/Makefile com32/rosh/Makefile com32/samples/Makefile core/init.c mk/elf.mk Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/elf.mk10
-rw-r--r--mk/lib.mk5
2 files changed, 11 insertions, 4 deletions
diff --git a/mk/elf.mk b/mk/elf.mk
index 76b5487e..bd8775cf 100644
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -47,7 +47,7 @@ com32 = $(topdir)/com32
core = $(topdir)/core
ifneq ($(NOGPL),1)
-GPLLIB = $(objdir)/com32/gpllib/libcom32gpl.c32
+GPLLIB = $(objdir)/com32/gpllib/libgpl.c32
GPLINCLUDE = -I$(com32)/gplinclude
else
GPLLIB =
@@ -68,7 +68,7 @@ LNXCFLAGS = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
LNXSFLAGS = -g
LNXLDFLAGS = -g
-C_LIBS = $(objdir)/com32/libutil/libutil_com.c32 $(GPLLIB) \
+C_LIBS = $(objdir)/com32/libutil/libutil.c32 $(GPLLIB) \
$(objdir)/com32/lib/libcom32.c32
C_LNXLIBS = $(objdir)/com32/libutil/libutil_lnx.a \
$(objdir)/com32/elflink/ldlinux/ldlinux_lnx.a
@@ -95,5 +95,9 @@ C_LNXLIBS = $(objdir)/com32/libutil/libutil_lnx.a \
%.lnx: %.lo $(LNXLIBS) $(C_LNXLIBS)
$(CC) $(LNXCFLAGS) -o $@ $^
-%.c32: %.o $(C_LIBS)
+.PRECIOUS: %.elf
+%.elf: %.o $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
+
+%.c32: %.elf
+ $(OBJCOPY) --strip-debug --strip-unneeded $< $@
diff --git a/mk/lib.mk b/mk/lib.mk
index 499a13b6..94502777 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -161,7 +161,7 @@ LIBLOAD_OBJS = \
LIBMODULE_OBJS = \
sys/module/common.o sys/module/$(ARCH)/elf_module.o \
- sys/module/$(ARCH)/shallow_module.o sys/module/elfutils.o \
+ sys/module/elfutils.o \
sys/module/exec.o sys/module/elf_module.o
# ZIP library object files
@@ -237,3 +237,6 @@ LDFLAGS = -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
.c.ls:
$(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -S -o $@ $<
+
+%.c32: %.elf
+ $(OBJCOPY) --strip-debug --strip-unneeded $< $@