blob: 0281f92ad3039dd0028e4bbe9ee716f073ae103d [file] [log] [blame]
# This Makefile builds the PNaCl version of compiler-rt (libgcc.a).
#
# This builds the *bitcode* version, for anything that the frontend
# (clang) depends upon (not functions the backend translator depends upon).
#
# More information on the functions of libgcc can be found at:
# http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc
# ../README.txt
#
# The following variables are expected to be set externally:
# SRC_DIR
# CC
# AR
# CFLAGS
# pick up .c files from another dir
vpath %.c ${SRC_DIR}
LIBM=compilerrt_logb.c compilerrt_logbf.c compilerrt_fmax.c compilerrt_fmaxf.c
FLOATING_POINT_COMPLEX=\
divdc3.c divsc3.c \
muldc3.c mulsc3.c
SRCS=$(LIBM) $(FLOATING_POINT_COMPLEX)
EXTRA_FLAGS= -I${SRC_DIR}
# overwrite default rule to make sure nothing unexpected happens.
%.o : %.c
$(CC) -c $(CFLAGS) ${EXTRA_FLAGS} $< -o $@
# The main target of this Makefile.
libgcc.a: $(SRCS:.c=.o)
$(AR) rc $@ $^
nacltest-pnacl:
test/builtins/Unit/nacltest.py $(TCROOT)/bin/pnacl-clang $(SRCS)