Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions osmodel.mak
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# This Makefile snippet detects the OS and the architecture MODEL
# Keep this file in sync between druntime, phobos, and dmd repositories!
# osmodel.mak
#
# Detects and sets the macros:
#
# OS = one of {osx,linux,freebsd,openbsd,netbsd,solaris}
# MODEL = one of { 32, 64 }
# MODEL_FLAG = one of { -m32, -m64 }
#
# Note:
# Keep this file in sync between druntime, phobos, and dmd repositories!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make things worse, there's dlang.org and tools as well.

# Source: https://github.com/dlang/phobos/blob/master/osmodel.mak


ifeq (,$(OS))
uname_S:=$(shell uname -s)
Expand All @@ -12,12 +22,12 @@ ifeq (,$(OS))
ifeq (FreeBSD,$(uname_S))
OS:=freebsd
endif
ifeq (NetBSD,$(uname_S))
OS:=netbsd
endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the file is alphabetically sorted ...

ifeq (OpenBSD,$(uname_S))
OS:=openbsd
endif
ifeq (NetBSD,$(uname_S))
OS:=netbsd
endif
ifeq (Solaris,$(uname_S))
OS:=solaris
endif
Expand Down