[2] | 1 | #-----[ Usual commands ]---------------------------------------------------------- |
---|
| 2 | RM = rm -fr |
---|
| 3 | MKDIR = mkdir -p |
---|
| 4 | ECHO = echo |
---|
| 5 | CCACHE = |
---|
| 6 | LS = ls |
---|
| 7 | TEST = test |
---|
| 8 | CAT = cat |
---|
| 9 | READ = read |
---|
| 10 | SED = sed |
---|
| 11 | MAKE = make -s |
---|
| 12 | CD = cd |
---|
| 13 | PWD = pwd |
---|
| 14 | |
---|
| 15 | #-----[ Directory ]--------------------------------------------------------------- |
---|
| 16 | DIR_LDSCRIPT = $(TOOLS)/newlib/libgloss/or32 |
---|
| 17 | |
---|
| 18 | DIR_INCLUDE = -I$(TOOLS)/newlib/newlib/libc/include/ \ |
---|
| 19 | -I$(TOOLS)/newlib/libgloss/or32/include/ |
---|
| 20 | DIR_LIBRARY = -L$(TOOLS)/newlib/or32-elf/newlib/ \ |
---|
| 21 | -L$(TOOLS)/newlib/or32-elf/libgloss/or32/ \ |
---|
| 22 | -L$(TOOLS)/or1k/lib/gcc/or32-elf/3.4.4/ |
---|
| 23 | |
---|
| 24 | #-----[ To the compilation ]------------------------------------------------------ |
---|
| 25 | OPTIMIZE = -O3 -fomit-frame-pointer -fdelayed-branch -mror -mcmov -msext -mhard-mul -msoft-div -msoft-float |
---|
| 26 | #Option : |
---|
| 27 | # -fomit-frame-pointer : n'utilise pas le pointeur de frame |
---|
| 28 | # -fdelayed-branch : utilise les delayed slot |
---|
| 29 | # ON OFF |
---|
| 30 | # -mror -mno-ror : utilisation de l'instruction l.ror |
---|
| 31 | # -mcmov -mno-cmov : utilisation de l'instruction l.cmov |
---|
| 32 | # -msext -mno-sext : utilisation des instructions l.extXX |
---|
| 33 | # -mhard-mul -msoft-mul : utilisation du multiplieur materiel |
---|
| 34 | # -mhard-div -msoft-div : utilisation du diviseur materiel |
---|
| 35 | # -mhard-float -msoft-float : utilisation du flottant materiel |
---|
| 36 | # -msibcall -mno-sibcall : Enable sibcall optimization |
---|
| 37 | # -mlogue -mno-logue : Schedule pro/epi-logue. |
---|
| 38 | # -maj -mno-aj : Use aligned jumps. |
---|
| 39 | |
---|
| 40 | # Tools |
---|
| 41 | CC = $(CCACHE) or32-elf-gcc |
---|
| 42 | AS = or32-elf-as |
---|
| 43 | LD = or32-elf-ld |
---|
| 44 | OBJDUMP = or32-elf-objdump |
---|
| 45 | NM = or32-elf-nm |
---|
| 46 | |
---|
| 47 | # Tools's option |
---|
| 48 | CC_OPT = $(DIR_INCLUDE) $(OPTIMIZE) -Wlong-long -D__or32__ -DHAVE_LIBC -D__DYNAMIC_REENT__ |
---|
| 49 | # -DHAVE_LIBC |
---|
| 50 | AS_OPT = |
---|
| 51 | LD_OPT = -T$(DIR_LDSCRIPT)/or32.ld $(DIR_LIBRARY) -lor32 -lc -lor32 -lc -lm -lgcc |
---|
| 52 | OBJDUMP_OPT = -D |
---|
| 53 | NM_OPT = -n |
---|