aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/emd2exml.in6
-rw-r--r--make/ose_lm.mk.in73
-rw-r--r--make/otp.mk.in7
-rw-r--r--make/otp_ded.mk.in1
-rw-r--r--make/otp_default_release_path.mk24
-rw-r--r--make/otp_release_targets.mk4
-rw-r--r--make/otp_subdir.mk4
-rw-r--r--make/output.mk.in6
-rw-r--r--make/run_make.mk2
9 files changed, 120 insertions, 7 deletions
diff --git a/make/emd2exml.in b/make/emd2exml.in
index 5bfe89894e..48473349d0 100644
--- a/make/emd2exml.in
+++ b/make/emd2exml.in
@@ -334,6 +334,8 @@ text(Line) ->
text("%ERTS-VSN%" ++ Cs, Acc) ->
text(Cs, ["@ERTS_VSN@"|Acc]);
+text("%OTP-VSN%" ++ Cs, Acc) ->
+ text(Cs, ["@OTP_VSN@"|Acc]);
text("%OTP-REL%" ++ Cs, Acc) ->
text(Cs, ["@OTP_REL@"|Acc]);
@@ -357,6 +359,8 @@ put_text(#state{c = CTag, emphasis = EmTag} = S, Line) ->
put_text(S, "%ERTS-VSN%"++Cs, CTag, EmTag, Acc) ->
put_text(S, Cs, CTag, EmTag, ["@ERTS_VSN@"|Acc]);
+put_text(S, "%OTP-VSN%"++Cs, CTag, EmTag, Acc) ->
+ put_text(S, Cs, CTag, EmTag, ["@OTP_VSN@"|Acc]);
put_text(S, "%OTP-REL%"++Cs, CTag, EmTag, Acc) ->
put_text(S, Cs, CTag, EmTag, ["@OTP_REL@"|Acc]);
@@ -560,6 +564,8 @@ code(Line) ->
code("%ERTS-VSN%" ++ Cs, Acc) ->
code(Cs, ["@ERTS_VSN@"|Acc]);
+code("%OTP-VSN%" ++ Cs, Acc) ->
+ code(Cs, ["@OTP_VSN@"|Acc]);
code("%OTP-REL%" ++ Cs, Acc) ->
code(Cs, ["@OTP_REL@"|Acc]);
diff --git a/make/ose_lm.mk.in b/make/ose_lm.mk.in
new file mode 100644
index 0000000000..2e659ada1a
--- /dev/null
+++ b/make/ose_lm.mk.in
@@ -0,0 +1,73 @@
+#-*-makefile-*- ; force emacs to enter makefile-mode
+# ----------------------------------------------------
+# Template target for generating an OSE5 load module
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2013. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+# Author: Petre Pircalabu
+# ----------------------------------------------------
+
+# ----------------------------------------------------
+# build-ose-load-module
+# Creates an OSE5 load module
+# params:
+# $(1) - The output target
+# $(2) - Objects
+# $(3) - Libraries
+# $(4) - LM configuration file
+# ----------------------------------------------------
+
+ifeq ($(findstring ose,$(TARGET)),ose)
+LDR1FLAGS = @erl_xcomp_ose_ldflags_pass1@
+LDR2FLAGS = @erl_xcomp_ose_ldflags_pass2@
+OSEROOT = @erl_xcomp_ose_OSEROOT@
+LCF = @erl_xcomp_ose_LM_LCF@
+LMCONF = @erl_xcomp_ose_LM_CONF@
+STRIP = @erl_xcomp_ose_STRIP@
+LM_POST_LINK = @erl_xcomp_ose_LM_POST_LINK@
+LM_SET_CONF = @erl_xcomp_ose_LM_SET_CONF@
+LM_ELF_SIZE = @erl_xcomp_ose_LM_ELF_SIZE@
+OSE_CONFD = @erl_xcomp_ose_CONFD@
+CRT0_LM = @erl_xcomp_ose_CRT0_LM@
+endif
+
+define build-ose-load-module
+ @echo " --- Linking $(1)"
+
+ @echo " --- Linking $(1) (pass 1)"
+ $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured_ro -r \
+ $(2) --start-group $(3) --end-group --cref --discard-none -M > $(1)_1.map
+
+ @echo " --- Linking $(1) (pass 2)"
+ $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured \
+ $(1)_unconfigured_ro -T $(LCF) -n --emit-relocs -e crt0_lm --cref \
+ --discard-none -M > $(1)_2.map
+
+ @echo " --- Inserting configuration"
+ $(ld_verbose) $(LM_SET_CONF) $(1)_unconfigured < $(4)
+
+ @echo " --- Striping $(1)"
+# $(ld_verbose) $(STRIP) $(1)_unconfigured
+
+ @echo " --- Postlinking $(1)"
+ $(ld_verbose) $(LM_POST_LINK) $(1)_unconfigured
+
+ @echo " --- Sizing $(1)"
+ $(ld_verbose) $(LM_ELF_SIZE) $(1)_unconfigured
+ mv $(1)_unconfigured $(1)
+endef
diff --git a/make/otp.mk.in b/make/otp.mk.in
index 785926b997..a89bc37820 100644
--- a/make/otp.mk.in
+++ b/make/otp.mk.in
@@ -30,6 +30,13 @@
include $(ERL_TOP)/make/output.mk
# ----------------------------------------------------
+# Version
+# ----------------------------------------------------
+
+OTP_VERSION = @OTP_VERSION@
+SYSTEM_VSN = @SYSTEM_VSN@
+
+# ----------------------------------------------------
# Cross Compiling
# ----------------------------------------------------
CROSS_COMPILING = @CROSS_COMPILING@
diff --git a/make/otp_ded.mk.in b/make/otp_ded.mk.in
index 0c9a8a087f..c534209a25 100644
--- a/make/otp_ded.mk.in
+++ b/make/otp_ded.mk.in
@@ -38,6 +38,7 @@ DED_THR_DEFS = @DED_THR_DEFS@
DED_EMU_THR_DEFS = @DED_EMU_THR_DEFS@
DED_WARN_FLAGS = @WFLAGS@
DED_CFLAGS = @WERRORFLAGS@ @WFLAGS@ @DED_EMU_THR_DEFS@ @DED_CFLAGS@
+DED_STATIC_CFLAGS = @WERRORFLAGS@ @WFLAGS@ @DED_EMU_THR_DEFS@ @DED_STATIC_CFLAGS@
DED_LIBS = @LIBS@
DED_EXT = @DED_EXT@
ERLANG_OSTYPE = @ERLANG_OSTYPE@
diff --git a/make/otp_default_release_path.mk b/make/otp_default_release_path.mk
new file mode 100644
index 0000000000..932bbb2f6d
--- /dev/null
+++ b/make/otp_default_release_path.mk
@@ -0,0 +1,24 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2014. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+
+#
+# Where to release to by default
+#
+
+OTP_DEFAULT_RELEASE_PATH="$(ERL_TOP)/release/$(TARGET)"
diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk
index b6afcd1c8b..fcac2ff695 100644
--- a/make/otp_release_targets.mk
+++ b/make/otp_release_targets.mk
@@ -17,6 +17,8 @@
# %CopyrightEnd%
#
+include $(ERL_TOP)/make/otp_default_release_path.mk
+
# ----------------------------------------------------
# Targets for the new documentation support
# ----------------------------------------------------
@@ -137,7 +139,7 @@ endif
ifeq ($(TESTROOT),)
release release_docs release_tests release_html:
- $(MAKE) $(MFLAGS) RELEASE_PATH="$(ERL_TOP)/release/$(TARGET)" \
+ $(MAKE) $(MFLAGS) RELEASE_PATH=$(OTP_DEFAULT_RELEASE_PATH) \
$(TARGET_MAKEFILE) $@_spec
else
diff --git a/make/otp_subdir.mk b/make/otp_subdir.mk
index 07294c272d..f31ab05c87 100644
--- a/make/otp_subdir.mk
+++ b/make/otp_subdir.mk
@@ -19,12 +19,12 @@
# Make include file for otp
.PHONY: debug opt release docs release_docs tests release_tests \
- clean depend valgrind
+ clean depend valgrind static_lib
#
# Targets that don't affect documentation directories
#
-opt debug release docs release_docs tests release_tests clean depend valgrind:
+opt debug release docs release_docs tests release_tests clean depend valgrind static_lib:
@set -e ; \
app_pwd=`pwd` ; \
if test -f vsn.mk; then \
diff --git a/make/output.mk.in b/make/output.mk.in
index 51d9401280..f2f738a2ce 100644
--- a/make/output.mk.in
+++ b/make/output.mk.in
@@ -65,9 +65,9 @@ cc_verbose_0 = @echo " CC "$@;
cc_verbose = $(cc_verbose_$(V))
V_CC = $(cc_verbose)$(CC)
-cpp_verbose_0 = @echo " CPP "$@;
-cpp_verbose = $(cpp_verbose_$(V))
-V_CPP = $(cpp_verbose)$(CPP)
+cxx_verbose_0 = @echo " CXX "$@;
+cxx_verbose = $(cxx_verbose_$(V))
+V_CXX = $(cxx_verbose)$(CXX)
# For the diameter compiler.
dia_verbose_0 = @echo " DIA "$@;
diff --git a/make/run_make.mk b/make/run_make.mk
index bb0da6743c..01ab257006 100644
--- a/make/run_make.mk
+++ b/make/run_make.mk
@@ -37,7 +37,7 @@ plain smp frag smp_frag:
$(make_verbose)$(MAKE) -f $(TARGET)/Makefile FLAVOR=$@
clean generate depend docs release release_spec release_docs release_docs_spec \
- tests release_tests release_tests_spec:
+ tests release_tests release_tests_spec static_lib:
$(make_verbose)$(MAKE) -f $(TARGET)/Makefile $@