Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
1e219c0b
Commit
1e219c0b
authored
Dec 20, 2016
by
Bernhard Nortmann
Browse files
Makefile: Use `uname` for OS detection on *nix platforms
Signed-off-by:
Bernhard Nortmann
<
bernhard.nortmann@web.de
>
parent
2f6e0697
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
1e219c0b
...
...
@@ -16,6 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Windows predefines OS in the environment (to "Windows_NT"), otherwise use uname
OS
?=
$(
shell
uname
)
CC
?=
gcc
DEFAULT_CFLAGS
:=
-std
=
c99
DEFAULT_CFLAGS
+=
-Wall
-Wextra
-Wno-unused-result
...
...
@@ -26,7 +29,7 @@ DEFAULT_CFLAGS += -D_POSIX_C_SOURCE=200112L
DEFAULT_CFLAGS
+=
-D_BSD_SOURCE
# glibc 2.20+ also requires _DEFAULT_SOURCE
DEFAULT_CFLAGS
+=
-D_DEFAULT_SOURCE
ifeq
(NetBSD
,$(OS)
)
ifeq
(
$(OS),
NetBSD)
# add explicit _NETBSD_SOURCE, see https://github.com/linux-sunxi/sunxi-tools/pull/22
DEFAULT_CFLAGS
+=
-D_NETBSD_SOURCE
endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment