Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/x_dhclient Clean up which .o members are built...



details:   https://anonhg.NetBSD.org/src/rev/8d7005e0b378
branches:  trunk
changeset: 525662:8d7005e0b378
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sun Apr 14 23:44:25 2002 +0000

description:
Clean up which .o members are built for each of the "fake" libraries;
.o files containing unused functions are still linked in (unlike a .a file)
Saves a bit of space by culling unused .c references.

(Required .o members determined by looking at the mapfile generated by
adding LDFLAGS+=-Wl,-Map,mapfile in dhcp/client/Makefile.)

diffstat:

 distrib/utils/x_dhclient/Makefile   |  38 ++++++++++++++++++------------------
 distrib/utils/x_dhclient/Src-common |   6 -----
 distrib/utils/x_dhclient/Src-dst    |   3 --
 distrib/utils/x_dhclient/Src-omapip |   5 ----
 4 files changed, 19 insertions(+), 33 deletions(-)

diffs (84 lines):

diff -r 093c1bca7dce -r 8d7005e0b378 distrib/utils/x_dhclient/Makefile
--- a/distrib/utils/x_dhclient/Makefile Sun Apr 14 21:52:25 2002 +0000
+++ b/distrib/utils/x_dhclient/Makefile Sun Apr 14 23:44:25 2002 +0000
@@ -1,35 +1,35 @@
-#      $NetBSD: Makefile,v 1.11 2001/12/12 00:05:12 tv Exp $
+#      $NetBSD: Makefile,v 1.12 2002/04/14 23:44:25 lukem Exp $
 
-RSRCDIR=       ${.CURDIR}/../../../dist/dhcp
-.PATH: ${RSRCDIR}/client ${RSRCDIR}/common ${RSRCDIR}/dst ${RSRCDIR}/omapip
+NOMAN=
+.include <bsd.own.mk>
+
+RSRCDIR=       ${_SRC_TOP_}/dist/dhcp
+
+.PATH:         ${RSRCDIR}/client
 
 PROG=          dhclient
-NOMAN=         # defined
 SRCS=          dhclient.c clparse.c
-
 CPPFLAGS+=     -DCLIENT_PATH='"PATH=/usr/bin:/usr/sbin:/bin:/sbin"' \
                -DSMALL -I${RSRCDIR} -I${RSRCDIR}/includes
 
-#.include "Src-dst"
-#DSTOBJS+=     ${DSTSRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
-#SRCS+=                ${DSTSRCS}
+#      common source
+#
+.PATH: ${RSRCDIR}/common
+SRCS+= alloc.c bpf.c comapi.c conflex.c discover.c dispatch.c dns.c \
+       ethernet.c execute.c fddi.c inet.c memory.c options.c packet.c \
+       parse.c print.c socket.c tables.c tree.c 
 
-.include "Src-omapip"
-OMOBJS+=       ${OMSRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
-SRCS+=         ${OMSRCS}
-
-.include "Src-common"
-COMOBJS+=      ${COMSRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
-SRCS+=         ${COMSRCS}
-
-${DSTOBJS}:
-       ${CC} ${CFLAGS} ${CPPFLAGS} -DMINIRES_LIB -c ${.IMPSRC}
+#      omapip source
+#
+.PATH: ${RSRCDIR}/omapip
+SRCS+= alloc.OM.c convert.c dispatch.OM.c errwarn.c handle.c hash.c \
+       result.c support.c
 
 .SUFFIXES: .OM.c
 
 .c.OM.c:
        cp ${RSRCDIR}/omapip/$*.c $@
 
-CLEANFILES+=   ${SRCS:M*.OM.c}
+CLEANFILES+=${SRCS:M*.OM.c}
 
 .include <bsd.prog.mk>
diff -r 093c1bca7dce -r 8d7005e0b378 distrib/utils/x_dhclient/Src-common
--- a/distrib/utils/x_dhclient/Src-common       Sun Apr 14 21:52:25 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#      $NetBSD: Src-common,v 1.6 2001/04/06 06:39:54 simonb Exp $
-
-COMSRCS= parse.c dispatch.c conflex.c bpf.c socket.c packet.c \
-        ethernet.c memory.c print.c options.c inet.c convert.c \
-        tree.c tables.c alloc.c dns.c execute.c discover.c fddi.c \
-        comapi.c
diff -r 093c1bca7dce -r 8d7005e0b378 distrib/utils/x_dhclient/Src-dst
--- a/distrib/utils/x_dhclient/Src-dst  Sun Apr 14 21:52:25 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-#      $NetBSD: Src-dst,v 1.1 2001/04/06 04:09:55 thorpej Exp $
-
-DSTSRCS= dst_api.c dst_support.c hmac_link.c prandom.c base64.c
diff -r 093c1bca7dce -r 8d7005e0b378 distrib/utils/x_dhclient/Src-omapip
--- a/distrib/utils/x_dhclient/Src-omapip       Sun Apr 14 21:52:25 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-#      $NetBSD: Src-omapip,v 1.6 2001/04/06 18:53:33 mellon Exp $
-
-OMSRCS=        array.c alloc.OM.c result.c \
-       errwarn.c dispatch.OM.c support.OM.c handle.c \
-       hash.OM.c



Home | Main Index | Thread Index | Old Index