Rev 30 | Blame | Compare with Previous | Last modification | View Log | RSS feed
# +----------------------------------------------------------------------+# $Id: otp.mk,v 1.4 2004/07/01 14:57:10 tfee Exp $# +----------------------------------------------------------------------+# otp.mk# - to be included in all OTP Makefiles# installed to /usr/local/include/erlang/otp.mk# gmake looks in /usr/local/include - that's hard-coded# users of this file will use# include erlang/top.mk# most interface files will be installed to $ERL_RUN_TOP/app-vsn/include/*.hrl# group owner for library/include directoriesERLANGDEV_GROUP=erlangdev# ERL_TOP is root of Erlang source tree# ERL_RUN_TOP is root of Erlang target tree (some Ericsson Makefiles use $ROOT)# ERLANG_OTP is target root for Erlang code# - see sasl/systools reference manual page; grep "TEST"# OS_TYPE is FreeBSD, NetBSD, OpenBSD, Linux, SCO_SV, SunOS.OS_TYPE=${shell uname}# MHOST is the host where this Makefile runs.MHOST=${shell hostname -s}ERL_COMPILE_FLAGS+=-W0# The location of the erlang runtime system.ifndef ERL_RUN_TOPERL_RUN_TOP=/usr/local/lib/erlangendif# Edit to reflect local environment.# ifeq (${OS_TYPE},Linux)# ERL_RUN_TOP=/usr/local/lib/erlang# Note* ERL_RUN_TOP can be determined by starting an# erlang shell and typing code:root_dir().# ERL_TOP=a symbolic link to the actual source top, which changes from version to version# Note* ERL_TOP is the directory where the erlang# source files reside. Make sure to run ./configure there.# TARGET=i686-pc-linux-gnu# Note* Target can be found in $ERL_TOP/erts# endif# See above for directions.ifeq (${OS_TYPE},Linux)ERL_TOP=/opt/OTP_SRCTARGET=i686-pc-linux-gnuendifERLANG_OTP=/usr/local/erlang/otpVAR_OTP=/var/otp# Aliases for common binaries# Note - CFLAGS is modified in erlang.conf################################# SunOS################################ifeq (${OS_TYPE},SunOS)CC=gccCXX=g++AR=/usr/ccs/bin/arARFLAGS=-rvCXXFLAGS+=${CFLAGS} -I/usr/include/g++LD=/usr/ccs/bin/ldRANLIB=/usr/ccs/bin/ranlibCFLAGS+=-Wall -pedantic -ansi -OCORE=*.coreendif################################# FreeBSD################################ifeq (${OS_TYPE},FreeBSD)ifdef LINUXBINCOMPAT_LINUX=/compat/linuxCC=${COMPAT_LINUX}/usr/bin/gccCXX=${COMPAT_LINUX}/usr/bin/g++AR=${COMPAT_LINUX}/usr/bin/arARFLAGS=-rvCXXFLAGS+=-fhandle-exceptions ${CFLAGS} -I${COMPAT_LINUX}/usr/include/g++LD=${COMPAT_LINUX}/usr/bin/ldRANLIB=${COMPAT_LINUX}/usr/bin/ranlibBRANDELF=brandelf -t LinuxelseCC=gccCXX=g++AR=/usr/bin/arARFLAGS=-rvCXXFLAGS+=-fhandle-exceptions ${CFLAGS} -I/usr/include/g++LD=/usr/bin/ldRANLIB=/usr/bin/ranlibBRANDELF=@trueifdef USES_PTHREADSCFLAGS+=-D_THREAD_SAFELDFLAGS+=-lc_r# -pthread flag for 3.0+ifneq (${shell uname -r | cut -d. -f1},2)CFLAGS+=-pthreadendifendifendifCFLAGS+=-Wall -pedantic -ansi -O -DFREEBSDCORE=*.coreendif################################# OpenBSD################################ifeq (${OS_TYPE},OpenBSD)CC=gccCXX=g++AR=/usr/bin/arARFLAGS=-rvCXXFLAGS+=${CFLAGS} -I/usr/include/g++LD=/usr/bin/ldRANLIB=/usr/bin/ranlibifdef USES_PTHREADSCFLAGS+=-D_THREAD_SAFELDFLAGS+=-lc_r# -pthread flag for 3.0+ifneq (${shell uname -r | cut -d. -f1},2)CFLAGS+=-pthreadendifendifCFLAGS+=-Wall -pedantic -ansi -O -DOPENBSDCORE=*.coreendif