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 @@ ...@@ -4,3 +4,4 @@
*.out *.out
*.o *.o
*.tmp *.tmp
*.objdump
...@@ -6,9 +6,3 @@ IR2CDIR=$(MYBASEDIR)/ir2c ...@@ -6,9 +6,3 @@ IR2CDIR=$(MYBASEDIR)/ir2c
#Directory for back annotation tool source #Directory for back annotation tool source
BADIR=$(MYBASEDIR)/back_annotate BADIR=$(MYBASEDIR)/back_annotate
# other tools
PYTHON = python
RM = rm
TOUCH = touch
LN = ln -s
include ../Makefile.macros include ../Makefile.macros
include Makefile.macros include Makefile.macros
EXAMPLES = sieve crc32 adpcm sha basicmath #EXAMPLES = sieve crc32 adpcm sha basicmath
#EXAMPLES = adpcm EXAMPLES = sha sieve
#EXAMPLES = simple #EXAMPLES = simple
STARTADR = 0x10000214 STARTADR = 0x10000214
......
...@@ -5,26 +5,48 @@ ...@@ -5,26 +5,48 @@
APPBASEDIR=adpcm APPBASEDIR=adpcm
#APPBASEDIR=sha #APPBASEDIR=sha
##################
#Define directory where application source files are stored. Must contain IR files too #Define directory where application source files are stored. Must contain IR files too
##################
APPDIR = app_dir APPDIR = app_dir
##################
#Directory for storing massaged IR files #Directory for storing massaged IR files
##################
IRDIR = ir_c IRDIR = ir_c
OBJDIR = ir_c OBJDIR = ir_c
#IRDIR = golden_IR
#OBJDIR = golden_IR/objdir
##################
#Directories for characterization files #Directories for characterization files
##################
IN_DAT_DIR = dat_inputs IN_DAT_DIR = dat_inputs
OUT_DAT_DIR = dat_outputs OUT_DAT_DIR = dat_outputs
##################
#Directory for host-compiled model #Directory for host-compiled model
##################
HC_DIR = hc_model HC_DIR = hc_model
##################
#Tools #Tools
##################
IR2C = $(PYTHON) $(IR2CDIR)/src/ir2c.py IR2C = $(PYTHON) $(IR2CDIR)/src/ir2c.py
# BA = env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/back_annotator.py # BA = env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/back_annotator.py
# MAP = env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/mapping.py # MAP = env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/mapping.py
# RUNALYSE= env PYTHONPATH=$(APPBASEDIR) $(PYTHON) $(BADIR)/src/adlSim_runalyse.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 @@ ...@@ -2,13 +2,10 @@
# Makefile for adpcm and test programs # Makefile for adpcm and test programs
# ------------------- # -------------------
###################################################################### include ../../Makefile.macros
#CFLAGS = -static -O3
APP1 = my_ctop APP1 = my_ctop
#PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc
TREEDUMP = -fdump-tree-all-blocks-details TREEDUMP = -fdump-tree-all-blocks-details
OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g DEBUG = -g
...@@ -16,22 +13,22 @@ IRDUMP = 1 #defined - dump IR files, undefined - don't. ...@@ -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 #PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE ifdef PHASE
CC = powerpc-elf-gcc CC = $(CROSS_GCC)
OBJDUMP = powerpc-elf-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
#ifeq (${IRDUMP},1) #ifeq (${IRDUMP},1)
ifdef IRDUMP ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP} COPTS = -static ${OPT} ${TREEDUMP}
else else
COPTS = -static -msim ${OPT} COPTS = -static ${OPT}
endif endif
ifdef PRINT ifdef PRINT
COPTS += -msoft-float COPTS += -msoft-float
endif endif
else else
CC = gcc CC = $(GCC)
OBJDUMP = objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
#ifeq (${IRDUMP}, 1) #ifeq (${IRDUMP}, 1)
ifdef IRDUMP ifdef IRDUMP
......
This diff is collapsed.
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
# ------------------- # -------------------
###################################################################### ######################################################################
#CFLAGS = -static -O3
include ../../Makefile.macros
APP1 = my_ctop_IR APP1 = my_ctop_IR
...@@ -15,29 +16,30 @@ DEBUG = -g ...@@ -15,29 +16,30 @@ DEBUG = -g
#IRDUMP = 1 #defined - dump IR files, undefined - don't. #IRDUMP = 1 #defined - dump IR files, undefined - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point #PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE ifdef PHASE
CC = arm-none-linux-gnueabi-gcc CC = $(CROSS_GCC)
OBJDUMP = arm-none-linux-gnueabi-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
#ifeq (${IRDUMP},1) #ifeq (${IRDUMP},1)
ifdef IRDUMP ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP} -I. COPTS = -static ${OPT} ${TREEDUMP}
else else
COPTS = -static -msim ${OPT} -I. COPTS = -static ${OPT}
endif endif
ifdef PRINT ifdef PRINT
COPTS += -msoft-float COPTS += -msoft-float
endif endif
else else
CC = gcc CC = $(GCC)
OBJDUMP = objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
#ifeq (${IRDUMP}, 1) #ifeq (${IRDUMP}, 1)
ifdef IRDUMP ifdef IRDUMP
COPTS = -static ${OPT} ${TREEDUMP} -I../../../ir2c/include COPTS = -static ${OPT}
else else
COPTS = -static ${OPT} -I../../../ir2c/include COPTS = -static ${OPT}
endif endif
endif endif
......
include ../../Makefile.macros
APP1 = basicmath_small APP1 = basicmath_small
APP1PRINT = basicmath_small_print APP1PRINT = basicmath_small_print
APP2 = basicmath_large APP2 = basicmath_large
...@@ -12,17 +14,17 @@ OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing ...@@ -12,17 +14,17 @@ OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g DEBUG = -g
ifdef PHASE ifdef PHASE
CC = powerpc-elf-gcc CC = $(CROSS_GCC)
OBJDUMP = powerpc-elf-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
ifeq (${MATH}, libsource) 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 else
COPTS = -static -msim -msoft-float ${OPT} ${TREEDUMP} COPTS = -static -msoft-float ${OPT} ${TREEDUMP}
endif endif
else else
CC = gcc CC = $(GCC)
OBJDUMP = objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
ifeq (${MATH}, libsource) ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_LITTLE_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static ${OPT} COPTS = -D_IEEE_LIBM -D__IEEE_LITTLE_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static ${OPT}
......
include ../../Makefile.macros
APP1 = basicmath_small_IR APP1 = basicmath_small_IR
APP1PRINT = basicmath_small_print APP1PRINT = basicmath_small_print
APP2 = basicmath_large APP2 = basicmath_large
...@@ -12,8 +14,8 @@ OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing ...@@ -12,8 +14,8 @@ OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
DEBUG = -g DEBUG = -g
ifdef PHASE ifdef PHASE
CC = powerpc-elf-gcc CC = $(CROSS_GCC)
OBJDUMP = powerpc-elf-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
ifeq (${MATH}, libsource) ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msim -msoft-float ${OPT} ${TREEDUMP} -I. 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 ...@@ -21,8 +23,8 @@ ifdef PHASE
COPTS = -static -msim -msoft-float ${OPT} ${TREEDUMP} -I. COPTS = -static -msim -msoft-float ${OPT} ${TREEDUMP} -I.
endif endif
else else
CC = gcc CC = $(GCC)
OBJDUMP = objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
ifeq (${MATH}, libsource) ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_LITTLE_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static ${OPT} -I../../../include -I../../../ir2c/include 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 APP1 = crc_top
#PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc #PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc
...@@ -9,22 +11,22 @@ IRDUMP = 1 #1 - dump IR files, 0 - don't. ...@@ -9,22 +11,22 @@ IRDUMP = 1 #1 - dump IR files, 0 - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point #PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE ifdef PHASE
CC = powerpc-elf-gcc CC = $(CROSS_GCC)
OBJDUMP = powerpc-elf-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
#ifeq (${IRDUMP},1) #ifeq (${IRDUMP},1)
ifdef IRDUMP ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP} COPTS = -static ${OPT} ${TREEDUMP}
else else
COPTS = -static -msim ${OPT} COPTS = -static ${OPT}
endif endif
ifdef PRINT ifdef PRINT
COPTS += -msoft-float COPTS += -msoft-float
endif endif
else else
CC = gcc CC = $(GCC)
OBJDUMP = objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
#ifeq (${IRDUMP}, 1) #ifeq (${IRDUMP}, 1)
ifdef IRDUMP ifdef IRDUMP
......
include ../../Makefile.macros
APP1 = crc_top_IR APP1 = crc_top_IR
#PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc #PHASE = final #when not defined, CC = gcc. otherwise cc = ppc-gcc
...@@ -8,18 +10,18 @@ DEBUG = -g ...@@ -8,18 +10,18 @@ DEBUG = -g
IRDUMP = 1 #1 - dump IR files, 0 - don't. IRDUMP = 1 #1 - dump IR files, 0 - don't.
ifdef PHASE ifdef PHASE
CC = powerpc-elf-gcc CC = $(CROSS_GCC)
OBJDUMP = powerpc-elf-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
#ifeq (${IRDUMP},1) #ifeq (${IRDUMP},1)
ifdef IRDUMP ifdef IRDUMP
COPTS = -static -msim ${OPT} ${TREEDUMP} -I. COPTS = -static ${OPT} ${TREEDUMP} -I.
else else
COPTS = -static -msim ${OPT} -I. COPTS = -static ${OPT} -I.
endif endif
else else
CC = gcc CC = $(GCC)
OBJDUMP = objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
#ifeq (${IRDUMP}, 1) #ifeq (${IRDUMP}, 1)
ifdef IRDUMP ifdef IRDUMP
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#clean: #clean:
# rm -rf *.o sha output* # rm -rf *.o sha output*
include ../../Makefile.macros
APP1 = sha_driver APP1 = sha_driver
APP2 = sha_driver_create_input_array APP2 = sha_driver_create_input_array
...@@ -26,14 +27,14 @@ IRDUMP = 1 #1 - dump IR files, 0 - don't. ...@@ -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 #PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE ifdef PHASE
CC = powerpc-elf-gcc CC = $(CROSS_GCC)
OBJDUMP = powerpc-elf-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
#ifeq (${IRDUMP},1) #ifeq (${IRDUMP},1)
ifdef IRDUMP ifdef IRDUMP
COPTS = -Wall -msim ${OPT} ${TREEDUMP} COPTS = -Wall ${OPT} ${TREEDUMP}
else else
COPTS = -Wall -msim ${OPT} COPTS = -Wall ${OPT}
endif endif
ifdef PRINT ifdef PRINT
...@@ -41,8 +42,8 @@ ifdef PHASE ...@@ -41,8 +42,8 @@ ifdef PHASE
endif endif
else else
CC = arm-none-eabi-gcc CC = $(GCC)
OBJDUMP = arm-none-eabi-objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
#ifeq (${IRDUMP}, 1) #ifeq (${IRDUMP}, 1)
ifdef IRDUMP ifdef IRDUMP
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#clean: #clean:
# rm -rf *.o sha output* # rm -rf *.o sha output*
include ../../Makefile.macros
APP1 = sha_driver_IR APP1 = sha_driver_IR
APP2 = sha_driver_create_input_array_IR APP2 = sha_driver_create_input_array_IR
...@@ -27,14 +28,14 @@ DEBUG = -g ...@@ -27,14 +28,14 @@ DEBUG = -g
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point #PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
ifdef PHASE ifdef PHASE
CC = powerpc-elf-gcc CC = $(CROSS_GCC)
OBJDUMP = powerpc-elf-objdump OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf OEXT = elf
#ifeq (${IRDUMP},1) #ifeq (${IRDUMP},1)
ifdef IRDUMP ifdef IRDUMP
COPTS = -Wall -msim ${OPT} ${TREEDUMP} -I. COPTS = -Wall ${OPT} ${TREEDUMP} -I.
else else
COPTS = -Wall -msim ${OPT} -I. COPTS = -Wall ${OPT} -I.
endif endif
ifdef PRINT ifdef PRINT
...@@ -42,8 +43,8 @@ ifdef PHASE ...@@ -42,8 +43,8 @@ ifdef PHASE
endif endif
else else
CC = gcc CC = $(GCC)
OBJDUMP = objdump OBJDUMP = $(HOST_OBJDUMP)
OEXT = out OEXT = out
#ifeq (${IRDUMP}, 1) #ifeq (${IRDUMP}, 1)
ifdef IRDUMP ifdef IRDUMP
......
TREEDUMP=-fdump-tree-all-blocks-details include ../../Makefile.macros
ifdef PHASE TREEDUMP = -fdump-tree-all-blocks-details
OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
OEXT=.elf DEBUG = -g
DUMPEXT=objdump IRDUMP = 1 #defined - dump IR files, undefined - don't.
#PRINT = 1 #if defined and PHASE defined, include soft-float lib. fprintf uses floating point
DEBUG=-g DUMPEXT = objdump
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
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 else
CC = $(GCC)
OEXT=.out OBJDUMP = $(HOST_OBJDUMP)
DUMPEXT=objdump OEXT = out
#ifeq (${IRDUMP}, 1)
DEBUG=-g ifdef IRDUMP
OPT=-O2 COPTS = -static ${OPT}
else
CFLAGS=$(OPT) COPTS = -static ${OPT}
endif
CC=gcc
OBJDUMP=objdump
endif endif
all: erat_sieve_no_print erat_sieve_print all: erat_sieve_no_print erat_sieve_print
test: test:
./erat_sieve_print$(OEXT) ./erat_sieve_print.$(OEXT)
erat_sieve_no_print:: erat_sieve_no_print.c erat_sieve_no_print:: erat_sieve_no_print.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^ $(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT) $(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
erat_sieve_print:: erat_sieve_print.c erat_sieve_print:: erat_sieve_print.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^ $(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT) $(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
#adding - to rm so that errors are ignored #adding - to rm so that errors are ignored
clean:: clean::
@echo Cleaning up massaged IR build @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 include ../../Makefile.macros
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) -I. TREEDUMP = -fdump-tree-all-blocks-details
OPT = -O2 #is O3 in original MiBench download. Use O3 for final testing
CC=powerpc-elf-gcc DEBUG = -g
IRDUMP = 0 #defined - dump IR files, undefined - don't.
OBJDUMP=powerpc-elf-objdump #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 else
CC = $(GCC)
OEXT=.out OBJDUMP = $(HOST_OBJDUMP)
DUMPEXT=objdump OEXT = out
#ifeq (${IRDUMP}, 1)
DEBUG=-g ifdef IRDUMP
OPT=-O2 COPTS = -static ${OPT} -I../../../ir2c/include
else
CFLAGS=$(OPT) -I../../../ir2c/include COPTS = -static ${OPT} -I../../../ir2c/include
endif
CC=gcc
OBJDUMP=objdump
endif endif
all: erat_sieve_no_print_IR all: erat_sieve_no_print_IR
test: test:
./erat_sieve_no_print_IR$(OEXT) ./erat_sieve_no_print_IR.$(OEXT)
erat_sieve_no_print_IR:: erat_sieve_no_print_IR.c erat_sieve_no_print_IR:: erat_sieve_no_print_IR.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^ $(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT) $(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
erat_sieve_print_IR:: erat_sieve_print_IR.c erat_sieve_print_IR:: erat_sieve_print_IR.c
$(CC) $(CFLAGS) -o $@$(OEXT) $^ $(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@$(OEXT) >& $@.$(DUMPEXT) $(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
#adding - to rm so that errors are ignored #adding - to rm so that errors are ignored
clean:: clean::
@echo Cleaning up massaged IR build @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