source: trunk/Softwares/Makefile.Software @ 111

Last change on this file since 111 was 111, checked in by rosiere, 15 years ago

1) Decod_queue : multi implementation (one_fifo, multi_fifo)
2) Issue_queue : multi implementation (in_order, out_of_order)
3) Direction : Add Meta predictor
4) Context_State : re add Branch_complete, More priority to Load miss (is not speculative)
5) Return_Address_Stack : update reg_PREDICT pointer on decod miss prediction
6) UPT : Fix bug in multi event
7) Prediction_glue : in read_stack case, insert in UPT pc_next
8) Rename select : when rob have an event (need flush), read_r{a,b,c} and write_r{d,e} is set at 0

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1#
2# $Id: Makefile.Software 111 2009-02-27 18:37:40Z rosiere $
3#
4# [ Description ]
5#
6# Makefile
7#
8
9ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
10        $(error "variable MORPHEO_TOPLEVEL is undefined")
11else
12        include $(MORPHEO_TOPLEVEL)/Makefile.tools
13endif
14
15#-----[ Directory ]---------------------------------------------------------------
16DIR_OBJ                         = obj
17DIR_BIN                         = bin
18
19EXE                             = soft
20
21DIR_COMMON              = $(MORPHEO_TOPLEVEL)/Softwares/Common
22DIR_COMMON_C            = $(DIR_COMMON)/src/c
23DIR_COMMON_ASM          = $(DIR_COMMON)/src/asm
24DIR_COMMON_SYS          = $(DIR_COMMON)/src/sys
25DIR_COMMON_INC          = $(DIR_COMMON)/include
26
27OBJECTS_COMMON          =       $(patsubst $(DIR_COMMON_SYS)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_SYS)/*.s))      \
28                                $(patsubst $(DIR_COMMON_ASM)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_ASM)/*.s))      \
29                                $(patsubst $(DIR_COMMON_C)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_C)/*.c))
30
31
32#-----[ To the compilation ]------------------------------------------------------
33OPTIMIZE                        = -O2 -std=c99 -fomit-frame-pointer -fdelayed-branch -mror -mcmov -msext -mhard-mul -msoft-div -msoft-float
34#Option :
35# -fomit-frame-pointer                  : n'utilise pas le pointeur de frame
36# -fdelayed-branch                      : utilise les delayed slot
37# ON            OFF
38# -mror         -mno-ror                : utilisation de l'instruction l.ror
39# -mcmov        -mno-cmov               : utilisation de l'instruction l.cmov
40# -msext        -mno-sext               : utilisation des instructions l.extXX
41# -mhard-mul    -msoft-mul              : utilisation du multiplieur materiel
42# -mhard-div    -msoft-div              : utilisation du diviseur materiel
43# -mhard-float  -msoft-float            : utilisation du flottant materiel
44# -msibcall     -mno-sibcall            : Enable sibcall optimization
45# -mlogue       -mno-logue              : Schedule pro/epi-logue.
46# -maj          -mno-aj                 : Use aligned jumps.
47
48# Tools
49OR32_CC                         = $(OR1K_BIN)/or32-elf-gcc
50OR32_AS                         = $(OR1K_BIN)/or32-elf-as
51OR32_LD                         = $(OR1K_BIN)/or32-elf-ld
52OR32_OBJDUMP                    = $(OR1K_BIN)/or32-elf-objdump
53OR32_NM                         = $(OR1K_BIN)/or32-elf-nm
54
55# Tools's option
56OR32_CC_OPT                     = -Wall $(INCDIR) $(OPTIMIZE) -Wlong-long
57# -DHAVE_LIBC
58OR32_AS_OPT                     =
59OR32_LD_OPT                     = -T$(DIR_LDSCRIPT)/or32.ld $(LIBDIR) $(LIBNAME)
60OR32_OBJDUMP_OPT                = -D
61OR32_NM_OPT                     = -n
62
63#-----[ Rules ]-------------------------------------------------------------------
64.PRECIOUS                       : $(DIR_BIN)/%.x.txt $(DIR_BIN)/%.x $(DIR_OBJ)/%.o
65
66vpath   %.h     $(DIR_INC):$(DIR_COMMON_INC)
67vpath   %.c     $(DIR_C):$(DIR_COMMON_C)
68vpath   %.s     $(DIR_ASM):$(DIR_SYS):$(DIR_COMMON_ASM):$(DIR_COMMON_SYS)
69vpath   %.o     $(DIR_OBJ)
70vpath   %.x     $(DIR_BIN)
71
72all                             :
73                                @\
74                                $(MKDIR) $(DIR_BIN) $(DIR_OBJ);                 \
75                                $(MAKE)  $(DIR_BIN)/$(EXE).x;
76
77$(DIR_BIN)/%.x                  : $(OBJECTS)
78                                @\
79                                $(ECHO) "Linkage            : $*.x";            \
80                                $(OR32_LD) -o $@ $^ $(OR32_LD_OPT);             \
81                                $(ECHO) "List symbols       : $*.x.nm";         \
82                                $(OR32_NM)      $(OR32_NM_OPT)      $^ > $@.nm; \
83                                $(ECHO) "Display info       : $*.x.txt";                \
84                                $(OR32_OBJDUMP) $(OR32_OBJDUMP_OPT) $@ > $@.txt;
85
86$(DIR_OBJ)/%.o                  : %.s   
87                                @\
88                                $(ECHO) "Compilation        : $*.s";            \
89                                $(OR32_CC) $(OR32_CC_OPT)     -o $@   -c $^ ;   \
90                                $(OR32_CC) $(OR32_CC_OPT)  -S -o $@.s -c $^ ;
91#                               @$(OR32_AS) $(OR32_AS_OPT) $^ -o $@
92
93$(DIR_OBJ)/%.o                  : %.c
94                                @\
95                                $(ECHO) "Compilation        : $*.c";            \
96                                $(OR32_CC) $(OR32_CC_OPT)     -o $@   -c $^ ;   \
97                                $(OR32_CC) $(OR32_CC_OPT)  -S -o $@.s -c $^ ;
98
99#-----[ Maintenance ]-------------------------------------------------------------
100clean                           :
101                                @\
102                                $(ECHO) "Delete     temporary files";           \
103                                $(RM)   $(DIR_OBJ) $(DIR_BIN)   \
104                                        *~                      \
105                                        $(DIR_SRC)/*~           \
106                                        $(DIR_C)/*~             \
107                                        $(DIR_ASM)/*~           \
108                                        $(DIR_SYS)/*~           \
109                                        $(DIR_INC)/*~           \
110                                        $(DIR_LDSCRIPT)/*~      \
111
112clean_all                       : clean
113
114#-----[ Help ]--------------------------------------------------------------------
115help                            :
116                                @\
117                                $(ECHO) "";\
118                                $(ECHO) "List of directive   : ";\
119                                $(ECHO) " * all              : Compile the software";\
120                                $(ECHO) " * clean            : Erase all files generates";\
121                                $(ECHO) " * clean_all        : Erase all files generates";\
122                                $(ECHO) "";
Note: See TracBrowser for help on using the repository browser.