66cb3e6641be209f638cd51e96505b24c3657c8f
1 UNAME_M :=$(shell uname -m)
2 ifneq (,$(findstring 86, $(UNAME_M)))
3 # In a cross compile environment we are assuming that the EVM file system
4 # is located on the build host and necessary ARM libraries are installed
5 # on that file system.
6 ifneq ($(MAKECMDGOALS),clean)
7 ifeq ($(TARGET_ROOTDIR),)
8 $(error Environment variable TARGET_ROOTDIR must be defined. Set it to point at the EVM root file system)
9 endif
10 endif
12 # gcc ARM cross compiler will not, by default, search the host's
13 # /usr/include. Explicitly specify here to find dependent vendor headers
14 CC = arm-linux-gnueabihf-gcc
15 else
16 CC = gcc
17 endif
19 CFLAGS = -g -O2 -I$(TARGET_ROOTDIR)/usr/include -I$(LINALG_DIR)/packages/ti/linalg
21 LIB_DIR = $(LINALG_DIR)/packages/ti/linalg/lib/
22 LD_FLAGS=-L$(TARGET_ROOTDIR)/lib -L$(TARGET_ROOTDIR)/usr/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/usr/lib
23 #BLASLIB = $(LIB_DIR)libcblas_armplusdsp.a $(LIB_DIR)libblis.a -lOpenCL -locl_util -lstdc++ -lrt -lm -lgomp -lpthread
24 BLASLIB = $(LIB_DIR)libcblas_armplusdsp.a -lOpenCL -locl_util -lstdc++ -lrt -lm -lgomp -lpthread
25 LAPACKLIB = $(LIB_DIR)libcblaswr.a $(LIB_DIR)liblapack.a $(LIB_DIR)libf2c.a $(LIB_DIR)libcblas_armplusdsp.a -lOpenCL -locl_util -lstdc++ -lrt -lm -lgomp -lpthread
27 %.o: %.c
28 $(CC) -c $(CFLAGS) $<
29 echo Compiling $<
31 $(EXE):
33 clean::
34 @rm -f $(EXE) *.o *.dat