summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f512231)
raw | patch | inline | side by side (parent: f512231)
author | Jianzhong Xu <a0869574@ti.com> | |
Fri, 15 May 2015 20:24:53 +0000 (16:24 -0400) | ||
committer | Jianzhong Xu <a0869574@ti.com> | |
Fri, 15 May 2015 20:24:53 +0000 (16:24 -0400) |
index c8f6e1139394b8e33a018aa195ed6699d01a5361..81918b8e816a6bee7eb7ca7755851b5ab12b57d6 100644 (file)
include ../make.inc
$(EXE): dgemm_test.o
- $(CC) $(CFLAGS) dgemm_test.o $(BLASLIB) -o $@
+ $(CC) $(CFLAGS) dgemm_test.o $(LD_FLAGS) $(BLASLIB) -o $@
run: ARMtest DSPtest OPTtest
index 8528b464690866073ca048ac16f6198c02c5dafd..bb027e2e190ac68add368f2e148acbb0f91f4627 100644 (file)
include ../make.inc
$(EXE): dsyrk_test.o
- $(CC) $(CFLAGS) dsyrk_test.o $(BLASLIB) -o $@
+ $(CC) $(CFLAGS) dsyrk_test.o $(LD_FLAGS) $(BLASLIB) -o $@
run: ARMtest DSPtest OPTtest
diff --git a/examples/eig/Makefile b/examples/eig/Makefile
index 571ab20cc32c6ac03aaca1eeb6f4633a71a8245b..c4d072a1edbb59004ec80438bb607df728815b8f 100644 (file)
--- a/examples/eig/Makefile
+++ b/examples/eig/Makefile
include ../make.inc
$(EXE): main.o dlaran.o dlarnd.o dlatm1.o dlatm2.o dlatm3.o dlatmr.o
- $(CC) $(CFLAGS) main.o dlaran.o dlarnd.o dlatm1.o dlatm2.o dlatm3.o dlatmr.o $(LAPACKLIB) -o $@
+ $(CC) $(CFLAGS) main.o dlaran.o dlarnd.o dlatm1.o dlatm2.o dlatm3.o dlatmr.o $(LD_FLAGS) $(LAPACKLIB) -o $@
run: ARMtest DSPtest OPTtest
index 7c97c8299327ebba248a02338892bffcbdf08cf1..1da8526acf15dadbb105ab8f4db13414dc9eacf9 100644 (file)
--- a/examples/ludinv/Makefile
+++ b/examples/ludinv/Makefile
include ../make.inc
$(EXE): main.o dlaran.o dlarnd.o dlatm1.o dlatm2.o dlatm3.o dlatmr.o
- $(CC) $(CFLAGS) main.o dlaran.o dlarnd.o dlatm1.o dlatm2.o dlatm3.o dlatmr.o $(LAPACKLIB) -o $@
+ $(CC) $(CFLAGS) main.o dlaran.o dlarnd.o dlatm1.o dlatm2.o dlatm3.o dlatmr.o $(LD_FLAGS) $(LAPACKLIB) -o $@
run: ARMtest DSPtest OPTtest
diff --git a/examples/make.inc b/examples/make.inc
index ee058bed93a24abb4c5428493c6cd9b90871d2a5..7c9c5dfeb2be61fb8f39d58b42ab5371f9447bc3 100644 (file)
--- a/examples/make.inc
+++ b/examples/make.inc
+UNAME_M :=$(shell uname -m)
+ifneq (,$(findstring 86, $(UNAME_M)))
+ # In a cross compile environment we are assuming that the EVM file system
+ # is located on the build host and necessary ARM libraries are installed
+ # on that file system.
+ ifneq ($(MAKECMDGOALS),clean)
+ ifeq ($(TARGET_ROOTDIR),)
+ $(error Environment variable TARGET_ROOTDIR must be defined. Set it to point at the EVM root file system)
+ endif
+ endif
-CC = gcc
-CFLAGS = -g -O2 -I/usr/include
+ # gcc ARM cross compiler will not, by default, search the host's
+ # /usr/include. Explicitly specify here to find dependent vendor headers
+CC = arm-linux-gnueabihf-gcc
+else
+CC = gcc
+endif
-LIB_DIR = /usr/lib/
+
+CFLAGS = -g -O2 -I$(TARGET_ROOTDIR)/usr/include
+
+LIB_DIR = $(TARGET_ROOTDIR)/usr/lib/
+LD_FLAGS=-L$(TARGET_ROOTDIR)/lib -L$(TARGET_ROOTDIR)/usr/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/usr/lib
BLASLIB = $(LIB_DIR)libcblas_armplusdsp.a $(LIB_DIR)libblis.a -lOpenCL -locl_util -lstdc++ -lrt -lm -lgomp
LAPACKLIB = $(LIB_DIR)libcblaswr.a $(LIB_DIR)liblapack.a $(LIB_DIR)libf2c.a $(LIB_DIR)libcblas_armplusdsp.a $(LIB_DIR)libblis.a -lOpenCL -locl_util -lstdc++ -lrt -lm -lgomp
%.o: %.c
- @$(CC) -c $(CFLAGS) $<
- @echo Compiling $<
+ $(CC) -c $(CFLAGS) $<
+ echo Compiling $<
$(EXE):
index 973abb608f49a177dd2099d84067664f5d3e902b..38605873ffa37efa3b25fb9b40d78dd81fe1f1a7 100644 (file)
--- a/examples/matmpy/Makefile
+++ b/examples/matmpy/Makefile
include ../make.inc
$(EXE): main.o
- $(CC) $(CFLAGS) main.o $(BLASLIB) -o $@
+ $(CC) $(CFLAGS) main.o $(LD_FLAGS) $(BLASLIB) -o $@
run: ARMtest DSPtest OPTtest
index ffd230e772d2e08b5deb4393e71b045006f4cbb9..438c037759ff7ab280828c012ec2ced8cefe0b52 100644 (file)
include ../make.inc
$(EXE): ztrmm_test.o
- $(CC) $(CFLAGS) ztrmm_test.o $(BLASLIB) -o $@
+ $(CC) $(CFLAGS) ztrmm_test.o $(LD_FLAGS) $(BLASLIB) -o $@
run: ARMtest DSPtest OPTtest
index 9476df7c3ec417c706d5ed60d498ce373be114ce..76610ced24eea1e931ca5e2db0d6853043689e33 100644 (file)
include ../make.inc
$(EXE): ztrsm_test.o
- $(CC) $(CFLAGS) ztrsm_test.o $(BLASLIB) -o $@
+ $(CC) $(CFLAGS) ztrsm_test.o $(LD_FLAGS) $(BLASLIB) -o $@
run: ARMtest DSPtest OPTtest