radare2/mk/tcc.mk

32 lines
599 B
Makefile
Raw Normal View History

2020-09-27 12:47:20 +08:00
CC=tcc -D__LITTLE_ENDIAN__=1
RANLIB?=ranlib
ONELIB=0
AR?=ar
CC_AR=${AR} -r ${LIBAR}
CC_LIB=${CC} -shared -o ${LIBSO}
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2
CFLAGS_OPT3=-O3
LD?=ld
2011-06-16 05:53:56 +08:00
ifeq ($(OSTYPE),darwin)
PARTIALLD=${LD} -r -all_load
2011-06-16 05:53:56 +08:00
LDFLAGS_LIB=-dynamiclib
2020-09-27 12:47:20 +08:00
LDFLAGS_SONAME=-soname
# LDFLAGS_SONAME=-Wl,-install_name,
2011-06-16 05:53:56 +08:00
else
PARTIALLD=${LD} -r --whole-archive
2011-06-16 05:53:56 +08:00
LDFLAGS_LIB=-shared
LDFLAGS_LIB+=-Dxx
#Wl,-soname,lib${NAME}.${EXT_SO}.${VERSION}
2020-09-27 12:47:20 +08:00
LDFLAGS_SONAME=-soname
2011-06-16 05:53:56 +08:00
#Wl,-soname=
endif
CC_LIB=${CC} ${LDFLAGS_LIB} -o ${LIBSO}
FLAGS_DEBUG=-g