2012-08-08 15:19:48 +00:00
|
|
|
ifeq (${_INCLUDE_MK_GCC_},)
|
|
|
|
_INCLUDE_MK_GCC_=1
|
2009-03-22 04:37:46 +00:00
|
|
|
CC?=gcc
|
|
|
|
LINK=
|
2011-03-10 10:36:16 +00:00
|
|
|
RANLIB=ranlib
|
2010-10-29 01:10:10 +00:00
|
|
|
ONELIB=0
|
2011-07-13 08:14:30 +00:00
|
|
|
CC_AR=ar q ${LIBAR}
|
2010-01-21 20:22:30 +00:00
|
|
|
CFLAGS+=-MD
|
2009-03-22 04:37:46 +00:00
|
|
|
CFLAGS_INCLUDE=-I
|
|
|
|
LDFLAGS_LINK=-l
|
2010-06-15 12:10:42 +00:00
|
|
|
LDFLAGS_LINKPATH=-L
|
2009-03-22 04:37:46 +00:00
|
|
|
CFLAGS_OPT0=-O0
|
|
|
|
CFLAGS_OPT1=-O1
|
|
|
|
CFLAGS_OPT2=-O2
|
|
|
|
CFLAGS_OPT3=-O3
|
|
|
|
CFLAGS_DEBUG=-g
|
2010-02-21 19:21:36 +00:00
|
|
|
|
2010-02-21 19:49:39 +00:00
|
|
|
ifeq ($(OSTYPE),darwin)
|
2011-08-23 21:16:08 +00:00
|
|
|
ARCH=$(shell uname -m)
|
2011-08-27 01:31:55 +00:00
|
|
|
#CFLAGS+=-arch ${ARCH}
|
|
|
|
#LDFLAGS+=-arch ${ARCH}
|
2010-02-21 19:21:36 +00:00
|
|
|
LDFLAGS_LIB=-dynamiclib
|
2012-02-06 12:20:57 +00:00
|
|
|
LDFLAGS_SONAME=-Wl,-install_name,${LIBDIR}/
|
2010-02-21 19:21:36 +00:00
|
|
|
else
|
2014-01-01 07:56:59 +00:00
|
|
|
LDFLAGS_LIB=${LDFLAGS} -shared
|
2011-07-18 22:12:36 +00:00
|
|
|
#ifneq (${NAME},)
|
|
|
|
#LDFLAGS_LIB+=-Wl,-soname,lib${NAME}.${EXT_SO}.${VERSION}
|
|
|
|
#endif
|
2010-04-05 20:49:22 +00:00
|
|
|
LDFLAGS_SONAME=-Wl,-soname=
|
2010-02-21 19:21:36 +00:00
|
|
|
endif
|
2013-04-01 03:52:21 +00:00
|
|
|
# XXX
|
|
|
|
#LDFLAGS_SONAME=-D_
|
2010-02-21 19:21:36 +00:00
|
|
|
|
|
|
|
CC_LIB=${CC} ${LDFLAGS_LIB} -o ${LIBSO}
|
2012-08-08 15:19:48 +00:00
|
|
|
endif
|