1
# ``The contents of this file are subject to the Erlang Public License,
2
# Version 1.1, (the "License"); you may not use this file except in
3
# compliance with the License. You should have received a copy of the
4
# Erlang Public License along with this software. If not, it can be
5
# retrieved via the world wide web at http://www.erlang.org/.
7
# Software distributed under the License is distributed on an "AS IS"
8
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
9
# the License for the specific language governing rights and limitations
12
# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
13
# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
14
# AB. All Rights Reserved.''
18
include $(ERL_TOP)/make/target.mk
21
# ----------------------------------------------------------------------
23
# Other erts dirs than the emulator dir...
24
ERTSDIRS = doc/src etc epmd lib_src
25
ifeq ($(NO_START_SCRIPTS),)
26
ERTSDIRS += start_scripts
29
BUILD_HYBRID_EMU=@ERTS_BUILD_HYBRID_EMU@
32
ifeq ($(BUILD_HYBRID_EMU),yes)
33
EXTRA_FLAVORS += hybrid
37
# Some byggy 'make's get confused when a directory is created and used
38
# for storing files which other files depend on during the same "make
39
# session". As a workaround we do a 'make generate' (which creates
40
# all directories) before doing 'make opt', etc...
48
*) ( cd emulator && $(MAKE) generate TYPE=$@ FLAVOR=$(FLAVOR)) ;; \
50
@ ( cd emulator && $(MAKE) $@ FLAVOR=$(FLAVOR))
51
@for d in $(ERTSDIRS); do \
52
if test -d $$d; then ( cd $$d && $(MAKE) $@ )fi ; \
55
# ----------------------------------------------------------------------
56
# These are "convenience targets", provided as shortcuts for developers
57
# - don't use them in scripts or assume they will always stay like this!
62
&& $(MAKE) generate TYPE=opt FLAVOR=$@ \
63
&& $(MAKE) opt FLAVOR=$@ )
65
ifneq ($(BUILD_HYBRID_EMU),yes)
67
@echo '*** Omitted build of hybrid heap emulator'
68
@echo '*** since target is $(TARGET)'
71
# Make erl script and erlc in $(ERL_TOP)/bin which runs the compiled version
72
# Note that erlc is not a script and requires extra handling on cygwin.
73
# also note that this file is not created by autoconf, that's why @EXEEXT@
76
# The copying of beam.dll should be removed when the beam dll need no longer be
77
# in the same directory...
79
@cd start_scripts && $(MAKE)
80
@rm -f $(ERL_TOP)/bin/erl $(ERL_TOP)/bin/erlc $(ERL_TOP)/bin/cerl \
81
$(ERL_TOP)/bin/erl.exe $(ERL_TOP)/bin/erlc.exe \
82
$(ERL_TOP)/bin/dialyzer $(ERL_TOP)/bin/dialyzer.exe \
83
$(ERL_TOP)/bin/start*.boot $(ERL_TOP)/bin/start*.script
84
@if [ "X$(TARGET)" = "Xwin32" ]; then \
85
cp $(ERL_TOP)/bin/$(TARGET)/dialyzer.exe $(ERL_TOP)/bin/dialyzer.exe; \
86
cp $(ERL_TOP)/bin/$(TARGET)/erlc.exe $(ERL_TOP)/bin/erlc.exe; \
87
cp $(ERL_TOP)/bin/$(TARGET)/erl.exe $(ERL_TOP)/bin/erl.exe; \
88
cp $(ERL_TOP)/bin/$(TARGET)/werl.exe $(ERL_TOP)/bin/werl.exe; \
89
chmod 755 $(ERL_TOP)/bin/erl.exe $(ERL_TOP)/bin/erlc.exe \
90
$(ERL_TOP)/bin/werl.exe; \
91
$(ERL_TOP)/erts/etc/win32/cygwin_tools/make_local_ini.sh \
94
sed -e "s;%FINAL_ROOTDIR%;$(ERL_TOP);" \
95
-e "s;erts-.*/bin;bin/$(TARGET);" \
96
-e "s;EMU=.*;EMU=beam$(TYPEMARKER);" \
97
$(ERL_TOP)/erts/etc/unix/erl.src.src > $(ERL_TOP)/bin/erl; \
98
sed -e "s;%SRC_ROOTDIR%;$(ERL_TOP);" \
99
-e "s;%TARGET%;$(TARGET);" \
100
-e "s;%VSN%;$(VSN);" \
101
$(ERL_TOP)/erts/etc/unix/cerl.src > $(ERL_TOP)/bin/cerl; \
102
cp $(ERL_TOP)/bin/$(TARGET)/dialyzer $(ERL_TOP)/bin/dialyzer; \
103
cp $(ERL_TOP)/bin/$(TARGET)/erlc $(ERL_TOP)/bin/erlc; \
104
chmod 755 $(ERL_TOP)/bin/erl $(ERL_TOP)/bin/erlc \
105
$(ERL_TOP)/bin/cerl; \
107
@cd start_scripts && $(MAKE) $(ERL_TOP)/bin/start.script \
108
$(ERL_TOP)/bin/start_sasl.script \
109
$(ERL_TOP)/bin/start_clean.script
111
# Run the configure script
113
@set -e ; cd autoconf && $(MAKE)
115
# Remake the makefiles, if you already have configured but you have edited
118
@set -e ; cd autoconf && $(MAKE) $@
120
# ----------------------------------------------------------------------
124
release release_docs:
125
ifeq ($(BUILD_HYBRID_EMU),yes)
126
@if test $@ = release; then ( cd emulator && $(MAKE) $@ FLAVOR=hybrid) fi
128
@if test $@ = release; then ( $(MAKE) hybrid ) fi
130
@if test $@ = release; then ( cd emulator && $(MAKE) $@ FLAVOR=smp) fi
131
@ (cd emulator && $(MAKE) $@ FLAVOR=plain)
132
@for d in $(ERTSDIRS); do \
133
if test -d $$d; then ( cd $$d && $(MAKE) $@ )fi ; \
136
# ----------------------------------------------------------------------
138
.PHONY: debug opt docs clean local_setup configure release \
139
release_docs run_test_cases hybrid smp