| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: strip.mk,v 1.5 2018/08/22 20:48:37 maya Exp $ | | 1 | # $NetBSD: strip.mk,v 1.6 2018/11/12 13:36:50 jperkin Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Johnny C. Lam. | | 7 | # by Johnny C. Lam. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -29,17 +29,30 @@ | | | @@ -29,17 +29,30 @@ |
29 | # | | 29 | # |
30 | | | 30 | |
31 | # | | 31 | # |
32 | # Depending on whether _INSTALL_UNSTRIPPED is defined, we cause | | 32 | # Depending on whether _INSTALL_UNSTRIPPED is defined, we cause |
33 | # ${TOOLS_DIR}/bin/strip to be either the correct strip tool or a no-op. | | 33 | # ${TOOLS_DIR}/bin/strip to be either the correct strip tool or a no-op. |
34 | # | | 34 | # |
35 | .if defined(_INSTALL_UNSTRIPPED) || !defined(TOOLS_PLATFORM.strip) | | 35 | .if defined(_INSTALL_UNSTRIPPED) || !defined(TOOLS_PLATFORM.strip) |
36 | TOOLS_NOOP+= strip | | 36 | TOOLS_NOOP+= strip |
37 | .else | | 37 | .else |
38 | TOOLS_CREATE+= strip | | 38 | TOOLS_CREATE+= strip |
39 | TOOLS_PATH.strip= ${TOOLS_PLATFORM.strip} | | 39 | TOOLS_PATH.strip= ${TOOLS_PLATFORM.strip} |
40 | .endif | | 40 | .endif |
41 | | | 41 | |
42 | # Make ${STRIP} call "strip" through the PATH, which should find the one | | 42 | # |
| | | 43 | # Create a special strip-dbg tool for stripping just debug information, |
| | | 44 | # used by the install-strip-debug target. Currently requires GNU strip. |
| | | 45 | # |
| | | 46 | .if !defined(TOOLS_PLATFORM.gstrip) |
| | | 47 | TOOLS_NOOP+= strip-dbg |
| | | 48 | .else |
| | | 49 | TOOLS_CREATE+= strip-dbg |
| | | 50 | TOOLS_PATH.strip-dbg= ${TOOLS_PLATFORM.gstrip} |
| | | 51 | TOOLS_ARGS.strip-dbg= -g |
| | | 52 | .endif |
| | | 53 | |
| | | 54 | # Make ${STRIP} and ${STRIP_DBG} call through the PATH so they find the ones |
43 | # under ${TOOLS_DIR}. | | 55 | # under ${TOOLS_DIR}. |
44 | # | | 56 | # |
45 | STRIP?= strip | | 57 | STRIP?= strip |
| | | 58 | STRIP_DBG?= strip-dbg |