2 # - to be included in all OTP Makefiles
3 # installed to /usr/local/include/erlang/otp.mk
5 # gmake looks in /usr/local/include - that's hard-coded
6 # users of this file will use include erlang/top.mk
8 # most interface files will be installed to $ERL_RUN_TOP/app-vsn/include/*.hrl
10 # The erts version to use when running your release
11 ifndef TARGET_ERTS_VSN
12 TARGET_ERTS_VSN
=%TARGET_ERTS_VSN
%
15 # The location of systemwide installed packages.
17 ERLWARE_HOME
=%FAXIEN_INSTALL_DIR
%
20 # group owner for library/include directories
21 ERLANGDEV_GROUP
=erlangdev
23 # ERL_TOP is root of Erlang source tree
24 # ERL_RUN_TOP is root of Erlang target tree (some Ericsson Makefiles use $ROOT)
25 # ERLANG_OTP is target root for Erlang code
26 # - see sasl/systools reference manual page; grep "TEST"
28 # OS_TYPE is FreeBSD, NetBSD, OpenBSD, Linux, SCO_SV, SunOS.
29 OS_TYPE
=${shell uname
}
31 # MHOST is the host where this Makefile runs.
32 MHOST
=${shell hostname
-s
}
33 ERL_COMPILE_FLAGS
+=-W0
35 # The location of the erlang runtime system.
37 ERL_RUN_TOP
=/usr
/local
/lib
/erlang
40 # Edit to reflect local environment.
41 # ifeq (${OS_TYPE},Linux)
42 # ERL_RUN_TOP=/usr/local/lib/erlang
43 # Note* ERL_RUN_TOP can be determined by starting an
44 # erlang shell and typing code:root_dir().
45 # ERL_TOP=a symbolic link to the actual source top, which changes from version to version
46 # Note* ERL_TOP is the directory where the erlang
47 # source files reside. Make sure to run ./configure there.
48 # TARGET=i686-pc-linux-gnu
49 # Note* Target can be found in $ERL_TOP/erts
52 # See above for directions.
53 ifeq (${OS_TYPE},Linux
)
55 TARGET
=i686-pc-linux-gnu
58 ERLANG_OTP
=/usr
/local
/erlang
/otp
62 # Aliases for common binaries
63 # Note - CFLAGS is modified in erlang.conf
66 ################################
68 ################################
69 ifeq (${OS_TYPE},SunOS
)
75 CXXFLAGS
+=${CFLAGS} -I
/usr
/include/g
++
77 RANLIB
=/usr
/ccs
/bin
/ranlib
79 CFLAGS
+=-Wall
-pedantic
-ansi
-O
84 ################################
86 ################################
87 ifeq (${OS_TYPE},FreeBSD
)
90 COMPAT_LINUX
=/compat
/linux
91 CC
=${COMPAT_LINUX}/usr
/bin
/gcc
92 CXX
=${COMPAT_LINUX}/usr
/bin
/g
++
93 AR
=${COMPAT_LINUX}/usr
/bin
/ar
95 CXXFLAGS
+=-fhandle-exceptions
${CFLAGS} -I
${COMPAT_LINUX}/usr
/include/g
++
96 LD
=${COMPAT_LINUX}/usr
/bin
/ld
97 RANLIB
=${COMPAT_LINUX}/usr
/bin
/ranlib
98 BRANDELF
=brandelf
-t Linux
104 CXXFLAGS
+=-fhandle-exceptions
${CFLAGS} -I
/usr
/include/g
++
106 RANLIB
=/usr
/bin
/ranlib
110 CFLAGS
+=-D_THREAD_SAFE
113 # -pthread flag for 3.0+
114 ifneq (${shell uname
-r | cut
-d.
-f1
},2)
120 CFLAGS
+=-Wall
-pedantic
-ansi
-O
-DFREEBSD
124 ################################
126 ################################
127 ifeq (${OS_TYPE},OpenBSD
)
133 CXXFLAGS
+=${CFLAGS} -I
/usr
/include/g
++
135 RANLIB
=/usr
/bin
/ranlib
138 CFLAGS
+=-D_THREAD_SAFE
141 # -pthread flag for 3.0+
142 ifneq (${shell uname
-r | cut
-d.
-f1
},2)
147 CFLAGS
+=-Wall
-pedantic
-ansi
-O
-DOPENBSD