[syslinux:master] Add "make strip" target
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Mon May 9 20:06:56 PDT 2011
Commit-ID: 2613174223371677d0a701a69cb7468947940d65
Gitweb: http://syslinux.zytor.com/commit/2613174223371677d0a701a69cb7468947940d65
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 9 May 2011 20:02:27 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 9 May 2011 20:02:27 -0700
Add "make strip" target
Add a "make strip" target, to make doing the official build easier.
We want the official build to have stripped binaries for size reasons,
so do it right and make it an actual build target.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
Makefile | 7 +++++++
Makefile.private | 1 +
extlinux/Makefile | 3 +++
libinstaller/Makefile | 2 ++
linux/Makefile | 3 +++
mk/syslinux.mk | 1 +
mtools/Makefile | 3 +++
utils/Makefile | 14 ++++++++++----
8 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 0f500a3..48b3420 100644
--- a/Makefile
+++ b/Makefile
@@ -98,6 +98,13 @@ installer:
installer-local: $(ITARGET) $(BINFILES)
+strip:
+ $(MAKE) strip-local
+ set -e ; for i in $(ISUBDIRS); do $(MAKE) -C $$i strip ; done
+ -ls -l $(BOBJECTS) $(IOBJECTS)
+
+strip-local:
+
version.gen: version version.pl
$(PERL) version.pl $< $@ '%define < @'
version.h: version version.pl
diff --git a/Makefile.private b/Makefile.private
index 6ca0598..972abc2 100644
--- a/Makefile.private
+++ b/Makefile.private
@@ -38,6 +38,7 @@ burn: isolinux.iso
official:
$(MAKE) spotless CC='$(CC) -m32'
$(MAKE) all CC='$(CC) -m32'
+ $(MAKE) strip CC='$(CC) -m32'
$(MAKE) dist CC='$(CC) -m32'
release:
diff --git a/extlinux/Makefile b/extlinux/Makefile
index c320f13..12213d8 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -54,6 +54,9 @@ installer: extlinux
extlinux: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
+strip:
+ $(STRIP) extlinux
+
%.o: %.c
$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
%.i: %.c
diff --git a/libinstaller/Makefile b/libinstaller/Makefile
index 2beb931..e67a468 100644
--- a/libinstaller/Makefile
+++ b/libinstaller/Makefile
@@ -26,3 +26,5 @@ clean: tidy
dist: tidy
spotless: clean
+
+strip:
diff --git a/linux/Makefile b/linux/Makefile
index ddc2f56..82bf111 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -57,6 +57,9 @@ syslinux: $(OBJS)
syslinux-nomtools: syslinux
ln -f $< $@
+strip:
+ $(STRIP) syslinux syslinux-nomtools
+
%.o: %.c
$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
%.i: %.c
diff --git a/mk/syslinux.mk b/mk/syslinux.mk
index 5f05870..6d87187 100644
--- a/mk/syslinux.mk
+++ b/mk/syslinux.mk
@@ -53,6 +53,7 @@ OBJCOPY = objcopy
AR = ar
NM = nm
RANLIB = ranlib
+STRIP = strip
GZIPPROG = gzip
XZ = xz
PNGTOPNM = pngtopnm
diff --git a/mtools/Makefile b/mtools/Makefile
index 5d4bc15..3e172fd 100755
--- a/mtools/Makefile
+++ b/mtools/Makefile
@@ -37,6 +37,9 @@ installer: syslinux
syslinux: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
+strip:
+ $(STRIP) syslinux
+
%.o: %.c
$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
%.i: %.c
diff --git a/utils/Makefile b/utils/Makefile
index 23f9a3d..acda8c0 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -21,10 +21,13 @@ include $(MAKEDIR)/syslinux.mk
CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
LDFLAGS = -O2
-TARGETS = mkdiskimage isohybrid gethostip memdiskfind
-TARGETS += isohybrid.pl # about to be obsoleted
-ASIS = keytab-lilo lss16toppm md5pass ppmtolss16 sha1pass syslinux2ansi \
- pxelinux-options
+C_TARGETS = isohybrid gethostip memdiskfind
+SCRIPT_TARGETS = mkdiskimage
+SCRIPT_TARGETS += isohybrid.pl # about to be obsoleted
+ASIS = keytab-lilo lss16toppm md5pass ppmtolss16 sha1pass \
+ syslinux2ansi pxelinux-options
+
+TARGETS = $(C_TARGETS) $(SCRIPT_TARGETS)
ISOHDPFX = ../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin ../mbr/isohdpfx_c.bin \
../mbr/isohdppx.bin ../mbr/isohdppx_f.bin ../mbr/isohdppx_c.bin
@@ -70,4 +73,7 @@ install: installer
mkdir -m 755 -p $(INSTALLROOT)$(BINDIR)
install -m 755 $(TARGETS) $(ASIS) $(INSTALLROOT)$(BINDIR)
+strip:
+ $(STRIP) $(C_TARGETS)
+
-include .*.d
More information about the Syslinux-commits
mailing list