From 001ca49cc60a1315ac7bff8bf488fa188f3a10af Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 17 Sep 2011 03:24:08 -0300 Subject: [PATCH] m1/perf/: build the patch compiler with gcc and with profiling --- m1/perf/Makefile | 35 ++++++++++++++++++++++++++++++++++ m1/perf/fakes/bsp | 1 + m1/perf/fakes/milkymist_pfpu.h | 1 + m1/perf/fakes/rtems.h | 0 4 files changed, 37 insertions(+) create mode 100644 m1/perf/Makefile create mode 120000 m1/perf/fakes/bsp create mode 100644 m1/perf/fakes/milkymist_pfpu.h create mode 100644 m1/perf/fakes/rtems.h diff --git a/m1/perf/Makefile b/m1/perf/Makefile new file mode 100644 index 0000000..20abdc7 --- /dev/null +++ b/m1/perf/Makefile @@ -0,0 +1,35 @@ +M1=/home/qi/m1 +COMPILER_DIR=$(M1)/flickernoise/src +M1SWINC_DIR=$(M1)/milkymist/software/include +M1SWLIB_DIR=$(M1)/milkymist/software/libfpvm + +CFLAGS_COMMON=-Wall -g -pg # -DCOMP_DEBUG +CFLAGS=$(CFLAGS_COMMON) \ + -I$(COMPILER_DIR) \ + -Ifakes -I$(M1SWINC_DIR) +LDFLAGS=-pg +LDLIBS=-L$(M1SWLIB_DIR) -lfpvm + + +COMPILER_O = $(COMPILER_DIR)/compiler.o +LIBFPVM_A = $(M1SWLIB_DIR)/libfpvm.a +OBJS = main.o $(COMPILER_O) + +all: main + +main: $(OBJS) $(LIBFPVM_A) + +$(COMPILER_O): + $(MAKE) -C $(COMPILER_DIR) CC=gcc \ + CFLAGS="$(CFLAGS_COMMON) -I$(M1SWINC_DIR) \ + -I$(shell pwd)/fakes" \ + compiler.o + +$(LIBFPVM_A): + $(MAKE) -C $(M1SWLIB_DIR) CC=gcc LD=gcc AR=ar RANLIB=ranlib \ + CFLAGS='$(CFLAGS_COMMON) $$(INCLUDES)' + +clean: + $(MAKE) -C $(M1SWLIB_DIR) clean + $(MAKE) -C $(COMPILER_DIR) clean + rm -f $(OBJS) diff --git a/m1/perf/fakes/bsp b/m1/perf/fakes/bsp new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/m1/perf/fakes/bsp @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/m1/perf/fakes/milkymist_pfpu.h b/m1/perf/fakes/milkymist_pfpu.h new file mode 100644 index 0000000..1a89b60 --- /dev/null +++ b/m1/perf/fakes/milkymist_pfpu.h @@ -0,0 +1 @@ +#include "hw/pfpu.h" diff --git a/m1/perf/fakes/rtems.h b/m1/perf/fakes/rtems.h new file mode 100644 index 0000000..e69de29