radare2/mk/gcc.mk
pancake a2ebdcb650 Fix memleaks, nullref and undef (clang-analyzer)
Fix multiple inclusions of mk files
2012-08-08 17:19:48 +02:00

35 lines
619 B
Makefile

ifeq (${_INCLUDE_MK_GCC_},)
_INCLUDE_MK_GCC_=1
CC?=gcc
LINK=
RANLIB=ranlib
ONELIB=0
CC_AR=ar q ${LIBAR}
PIC_CFLAGS=-fPIC
CFLAGS+=-MD
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2
CFLAGS_OPT3=-O3
CFLAGS_DEBUG=-g
ifeq ($(OSTYPE),darwin)
ARCH=$(shell uname -m)
#CFLAGS+=-arch ${ARCH}
#LDFLAGS+=-arch ${ARCH}
LDFLAGS_LIB=-dynamiclib
LDFLAGS_SONAME=-Wl,-install_name,${LIBDIR}/
else
LDFLAGS_LIB=-shared
#ifneq (${NAME},)
#LDFLAGS_LIB+=-Wl,-soname,lib${NAME}.${EXT_SO}.${VERSION}
#endif
LDFLAGS_SONAME=-Wl,-soname=
endif
CC_LIB=${CC} ${LDFLAGS_LIB} -o ${LIBSO}
endif