Commit ea226d19 authored by gaurav's avatar gaurav

Made changes to Makefile to use ARM cross-compiler and gcc-4.4

 * Also removed some binaries
parent e73ac064
......@@ -4,3 +4,4 @@
*.out
*.o
*.tmp
*.objdump
......@@ -5,10 +5,4 @@ export MYBASEDIR:=/home/gaurav/eclipse-workspace/pycparser_examples
IR2CDIR=$(MYBASEDIR)/ir2c
#Directory for back annotation tool source
BADIR=$(MYBASEDIR)/back_annotate
# other tools
PYTHON = python
RM = rm
TOUCH = touch
LN = ln -s
BADIR=$(MYBASEDIR)/back_annotate
\ No newline at end of file
include ../Makefile.macros
include Makefile.macros
EXAMPLES = sieve crc32 adpcm sha basicmath
#EXAMPLES = adpcm
#EXAMPLES = sieve crc32 adpcm sha basicmath
EXAMPLES = sha sieve
#EXAMPLES = simple
STARTADR = 0x10000214
......
......@@ -5,26 +5,48 @@
APPBASEDIR=adpcm
#APPBASEDIR=sha
##################
#Define directory where application source files are stored. Must contain IR files too
##################
APPDIR = app_dir
##################
#Directory for storing massaged IR files
##################
IRDIR = ir_c
OBJDIR = ir_c
#IRDIR = golden_IR
#OBJDIR = golden_IR/objdir
##################
#Directories for characterization files
##################
IN_DAT_DIR = dat_inputs
OUT_DAT_DIR = dat_outputs
##################
#Directory for host-compiled model
##################
HC_DIR = hc_model
##################
#Tools
##################
IR2C = $(PYTHON) $(IR2CDIR)/src/ir2c.py
# BA = env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/back_annotator.py
# MAP = env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/mapping.py
# RUNALYSE= env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/adlSim_runalyse.py
##################
# other tools
##################
PYTHON = python
RM = rm
TOUCH = touch
LN = ln -s
CROSS_GCC = arm-linux-gnueabi-gcc-4.4
CROSS_OBJDUMP = arm-linux-gnueabi-objdump
GCC = gcc-4.4
HOST_OBJDUMP = objdump
\ No newline at end of file
......@@ -2,13 +2,10 @@
# Makefile for adpcm and test programs
# -------------------
######################################################################
#CFLAGS = -static -O3
include ../../Makefile.macros
APP1 = my_ctop
#PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc
TREEDUMP = -fdump-tree-all-blocks-details
OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g
......@@ -16,22 +13,22 @@ IRDUMP = 1 #defined - dump IR files, undefined - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE
CC = powerpc-elf-gcc
OBJDUMP = powerpc-elf-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP}
COPTS = -static ${OPT} ${TREEDUMP}
else
COPTS = -static -msim ${OPT}
COPTS = -static ${OPT}
endif
ifdef PRINT
COPTS += -msoft-float
endif
else
CC = gcc
OBJDUMP = objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,8 @@
# -------------------
######################################################################
#CFLAGS = -static -O3
include ../../Makefile.macros
APP1 = my_ctop_IR
......@@ -15,29 +16,30 @@ DEBUG = -g
#IRDUMP = 1 #defined - dump IR files, undefined - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE
CC = arm-none-linux-gnueabi-gcc
OBJDUMP = arm-none-linux-gnueabi-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP} -I.
COPTS = -static ${OPT} ${TREEDUMP}
else
COPTS = -static -msim ${OPT} -I.
COPTS = -static ${OPT}
endif
ifdef PRINT
COPTS += -msoft-float
endif
else
CC = gcc
OBJDUMP = objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
COPTS = -static ${OPT} ${TREEDUMP} -I../../../ir2c/include
COPTS = -static ${OPT}
else
COPTS = -static ${OPT} -I../../../ir2c/include
COPTS = -static ${OPT}
endif
endif
......
include ../../Makefile.macros
APP1 = basicmath_small
APP1PRINT = basicmath_small_print
APP2 = basicmath_large
......@@ -12,17 +14,17 @@ OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g
ifdef PHASE
CC = powerpc-elf-gcc
OBJDUMP = powerpc-elf-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msim -msoft-float ${OPT} ${TREEDUMP}
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msoft-float ${OPT} ${TREEDUMP}
else
COPTS = -static -msim -msoft-float ${OPT} ${TREEDUMP}
COPTS = -static -msoft-float ${OPT} ${TREEDUMP}
endif
else
CC = gcc
OBJDUMP = objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_LITTLE_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static ${OPT}
......
include ../../Makefile.macros
APP1 = basicmath_small_IR
APP1PRINT = basicmath_small_print
APP2 = basicmath_large
......@@ -12,8 +14,8 @@ OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g
ifdef PHASE
CC = powerpc-elf-gcc
OBJDUMP = powerpc-elf-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msim -msoft-float ${OPT} ${TREEDUMP} -I.
......@@ -21,8 +23,8 @@ ifdef PHASE
COPTS = -static -msim -msoft-float ${OPT} ${TREEDUMP} -I.
endif
else
CC = gcc
OBJDUMP = objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_LITTLE_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static ${OPT} -I../../../include -I../../../ir2c/include
......
include ../../Makefile.macros
APP1 = crc_top
#PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc
......@@ -9,26 +11,26 @@ IRDUMP = 1 #1 - dump IR files, 0 - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE
CC = powerpc-elf-gcc
OBJDUMP = powerpc-elf-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP}
COPTS = -static ${OPT} ${TREEDUMP}
else
COPTS = -static -msim ${OPT}
COPTS = -static ${OPT}
endif
ifdef PRINT
COPTS += -msoft-float
endif
else
CC = gcc
OBJDUMP = objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
COPTS = -static ${OPT}
COPTS = -static ${OPT}
else
COPTS = -static ${OPT}
endif
......
include ../../Makefile.macros
APP1 = crc_top_IR
#PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc
......@@ -8,18 +10,18 @@ DEBUG = -g
IRDUMP = 1 #1 - dump IR files, 0 - don't.
ifdef PHASE
CC = powerpc-elf-gcc
OBJDUMP = powerpc-elf-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP} -I.
COPTS = -static ${OPT} ${TREEDUMP} -I.
else
COPTS = -static -msim ${OPT} -I.
COPTS = -static ${OPT} -I.
endif
else
CC = gcc
OBJDUMP = objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
......
......@@ -13,6 +13,7 @@
#clean:
# rm -rf *.o sha output*
include ../../Makefile.macros
APP1 = sha_driver
APP2 = sha_driver_create_input_array
......@@ -26,14 +27,14 @@ IRDUMP = 1 #1 - dump IR files, 0 - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE
CC = powerpc-elf-gcc
OBJDUMP = powerpc-elf-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -Wall -msim ${OPT} ${TREEDUMP}
COPTS = -Wall ${OPT} ${TREEDUMP}
else
COPTS = -Wall -msim ${OPT}
COPTS = -Wall ${OPT}
endif
ifdef PRINT
......@@ -41,8 +42,8 @@ ifdef PHASE
endif
else
CC = arm-none-eabi-gcc
OBJDUMP = arm-none-eabi-objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
......
......@@ -13,6 +13,7 @@
#clean:
# rm -rf *.o sha output*
include ../../Makefile.macros
APP1 = sha_driver_IR
APP2 = sha_driver_create_input_array_IR
......@@ -27,14 +28,14 @@ DEBUG = -g
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE
CC = powerpc-elf-gcc
OBJDUMP = powerpc-elf-objdump
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -Wall -msim ${OPT} ${TREEDUMP} -I.
COPTS = -Wall ${OPT} ${TREEDUMP} -I.
else
COPTS = -Wall -msim ${OPT} -I.
COPTS = -Wall ${OPT} -I.
endif
ifdef PRINT
......@@ -42,8 +43,8 @@ ifdef PHASE
endif
else
CC = gcc
OBJDUMP = objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
......
TREEDUMP=-fdump-tree-all-blocks-details
include ../../Makefile.macros
ifdef PHASE
OEXT=.elf
DUMPEXT=objdump
DEBUG=-g
OPT=-O2
CFLAGS=-pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msim -msoft-float $(OPT) $(TREEDUMP)
CC=powerpc-elf-gcc
OBJDUMP=powerpc-elf-objdump
TREEDUMP = -fdump-tree-all-blocks-details
OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g
IRDUMP = 1 #defined - dump IR files, undefined - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
DUMPEXT = objdump
ifdef PHASE
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) $(TREEDUMP)
else
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT)
endif
ifdef PRINT
COPTS += -msoft-float
endif
else
OEXT=.out
DUMPEXT=objdump
DEBUG=-g
OPT=-O2
CFLAGS=$(OPT)
CC=gcc
OBJDUMP=objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
COPTS = -static ${OPT}
else
COPTS = -static ${OPT}
endif
endif
all: erat_sieve_no_print erat_sieve_print
test:
./erat_sieve_print$(OEXT)
./erat_sieve_print.$(OEXT)
erat_sieve_no_print:: erat_sieve_no_print.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT)
$(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
erat_sieve_print:: erat_sieve_print.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT)
$(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
#adding - to rm so that errors are ignored
clean::
@echo Cleaning up massaged IR build
-rm *$(OEXT) *.objdump erat_sieve_no_print.c.* erat_sieve_print.c.*
-rm *.$(OEXT) *.objdump erat_sieve_no_print.c.* erat_sieve_print.c.*
ifdef PHASE
OEXT=.elf
DUMPEXT=objdump
DEBUG=-g
OPT=-O2
include ../../Makefile.macros
CFLAGS=-pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msim -msoft-float $(OPT) -I.
CC=powerpc-elf-gcc
OBJDUMP=powerpc-elf-objdump
TREEDUMP = -fdump-tree-all-blocks-details
OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g
IRDUMP = 0 #defined - dump IR files, undefined - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE
CC = $(CROSS_GCC)
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) $(TREEDUMP) -I.
else
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) -I.
endif
ifdef PRINT
COPTS += -msoft-float
endif
else
OEXT=.out
DUMPEXT=objdump
DEBUG=-g
OPT=-O2
CFLAGS=$(OPT) -I../../../ir2c/include
CC=gcc
OBJDUMP=objdump
CC = $(GCC)
OBJDUMP = $(HOST_OBJDUMP)
OEXT = out
#ifeq (${IRDUMP}, 1)
ifdef IRDUMP
COPTS = -static ${OPT} -I../../../ir2c/include
else
COPTS = -static ${OPT} -I../../../ir2c/include
endif
endif
all: erat_sieve_no_print_IR
test:
./erat_sieve_no_print_IR$(OEXT)
./erat_sieve_no_print_IR.$(OEXT)
erat_sieve_no_print_IR:: erat_sieve_no_print_IR.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT)
$(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
erat_sieve_print_IR:: erat_sieve_print_IR.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT)
$(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
#adding - to rm so that errors are ignored
clean::
@echo Cleaning up massaged IR build
-rm *$(OEXT) *.objdump
-rm *.$(OEXT) *.objdump
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment