Changeset 137 for trunk/Softwares/Makefile.Software
- Timestamp:
- Feb 16, 2010, 1:35:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Softwares/Makefile.Software
r136 r137 13 13 endif 14 14 15 include $(MORPHEO_TOPLEVEL)/Softwares/Makefile.defs 16 15 17 #-----[ Directory ]--------------------------------------------------------------- 18 16 19 DIR_OBJ = obj 17 20 DIR_BIN = bin … … 19 22 EXE = soft 20 23 21 DIR_COMMON = $(MORPHEO_TOPLEVEL)/Softwares/Common22 DIR_COMMON_C = $(DIR_COMMON)/src/c23 DIR_COMMON_ASM = $(DIR_COMMON)/src/asm24 DIR_COMMON_SYS = $(DIR_COMMON)/src/sys25 DIR_COMMON_INC = $(DIR_COMMON)/include24 DIR_COMMON = $(MORPHEO_TOPLEVEL)/Softwares/Common 25 DIR_COMMON_C = $(DIR_COMMON)/src/c 26 DIR_COMMON_ASM = $(DIR_COMMON)/src/asm 27 DIR_COMMON_SYS = $(DIR_COMMON)/src/sys 28 DIR_COMMON_INC = $(DIR_COMMON)/include 26 29 27 OBJECTS_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 OBJECTS_COMMON = $(patsubst $(DIR_COMMON_SYS)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_SYS)/*.s))\ 31 $(patsubst $(DIR_COMMON_ASM)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_ASM)/*.s))\ 32 $(patsubst $(DIR_COMMON_C)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_C)/*.c)) 30 33 31 34 32 35 #-----[ To the compilation ]------------------------------------------------------ 33 OPTIMIZE = -O3 -std=c99 -fomit-frame-pointer -fdelayed-branch -mror -mcmov -msext -mhard-mul -msoft-div -msoft-float 36 37 #~~~~~[ OS : Newlib ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 NEWLIB_DIR_LDSCRIPT = $(NEWLIB)/lib/ 39 #NEWLIB_INCDIR 40 #NEWLIB_LIBDIR 41 #NEWLIB_LIBNAME 42 NEWLIB_OBJECTS = $(NEWLIB)/lib/*.o 43 44 #~~~~~[ OS : UNIX ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 UNIX_DIR_LDSCRIPT = 46 UNIX_INCDIR = 47 UNIX_LIBDIR = 48 UNIX_LIBNAME = -lm 49 UNIX_OBJECTS = 50 51 52 #~~~~~[ TARGET : MORPHEO ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 53 54 MORPHEO_OPTIMIZE = -O3 -std=c99 -fomit-frame-pointer -fdelayed-branch -mror -mcmov -msext -mhard-mul -msoft-div -msoft-float 34 55 35 56 #Option : … … 48 69 49 70 # Tools 50 OR32_CC= $(OR1K_BIN)/or32-elf-gcc51 OR32_AS= $(OR1K_BIN)/or32-elf-as52 OR32_LD= $(OR1K_BIN)/or32-elf-ld53 OR32_OBJDUMP = $(OR1K_BIN)/or32-elf-objdump54 OR32_NM = $(OR1K_BIN)/or32-elf-nm71 MORPHEO_CC = $(OR1K_BIN)/or32-elf-gcc 72 MORPHEO_AS = $(OR1K_BIN)/or32-elf-as 73 MORPHEO_LD = $(OR1K_BIN)/or32-elf-ld 74 MORPHEO_OBJDUMP = $(OR1K_BIN)/or32-elf-objdump 75 MORPHEO_NM = $(OR1K_BIN)/or32-elf-nm 55 76 56 77 # Tools's option 57 OR32_CC_OPT = -Wall $(INCDIR) $(OPTIMIZE) -Wlong-long -DMorpheo $(FLAGS)78 MORPHEO_CC_OPT = -Wall $(INCDIR) $(MORPHEO_OPTIMIZE) -Wlong-long -DMorpheo $(FLAGS) 58 79 # -DHAVE_LIBC 59 OR32_AS_OPT = 60 OR32_LD_OPT = -T$(DIR_LDSCRIPT)/or32.ld $(LIBDIR) $(LIBNAME) $(OR1K_LIBDIR) $(OR1K_LIBNAME) 61 OR32_OBJDUMP_OPT = -D 62 OR32_NM_OPT = -n 80 MORPHEO_AS_OPT = 81 MORPHEO_LD_OPT = -T$(DIR_LDSCRIPT)/or32.ld $(LIBDIR) $(LIBNAME) $(OR1K_LIBDIR) $(OR1K_LIBNAME) 82 MORPHEO_OBJDUMP_OPT = -D 83 MORPHEO_NM_OPT = -n 84 85 #~~~~~[ TARGET : x86 ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 87 x86_OPTIMIZE = -O3 -std=c99 88 89 x86_CC = gcc 90 x86_AS = as 91 x86_LD = gcc 92 x86_OBJDUMP = objdump 93 x86_NM = nm 94 95 x86_CC_OPT = -Wall $(INCDIR) $(x86_OPTIMIZE) -Wlong-long -DUNIX $(FLAGS) -g3 96 x86_AS_OPT = 97 x86_LD_OPT = $(LIBDIR) $(LIBNAME) -g3 98 x86_OBJDUMP_OPT = -D 99 x86_NM_OPT = -n 63 100 64 101 #-----[ Rules ]------------------------------------------------------------------- … … 77 114 $(MAKE) $(OBJECTS); \ 78 115 $(ECHO) "Linkage : $*.x"; \ 79 $( OR32_LD) -o $@ $(OBJECTS) $(OR32_LD_OPT); \116 $($(TARGET)_LD) -o $@ $(OBJECTS) $($(TARGET)_LD_OPT); \ 80 117 $(ECHO) "List symbols : $*.x.nm"; \ 81 $( OR32_NM) $(OR32_NM_OPT) $@ > $@.nm; \118 $($(TARGET)_NM) $($(TARGET)_NM_OPT) $@ > $@.nm; \ 82 119 $(ECHO) "Display info : $*.x.txt"; \ 83 $( OR32_OBJDUMP) $(OR32_OBJDUMP_OPT) $@ > $@.txt;\120 $($(TARGET)_OBJDUMP) $($(TARGET)_OBJDUMP_OPT) $@ > $@.txt;\ 84 121 echo $($(GREP) "l.jal 0" $@.txt); 85 122 … … 87 124 @\ 88 125 $(ECHO) "Compilation : $*.s"; \ 89 $( OR32_CC) $(OR32_CC_OPT) -o $@ -c $^ ;90 # $( OR32_CC) $(OR32_CC_OPT) -S -o $@.s -c $^ ;126 $($(TARGET)_CC) $($(TARGET)_CC_OPT) -o $@ -c $^ ; 127 # $($(TARGET)_CC) $($(TARGET)_CC_OPT) -S -o $@.s -c $^ ; 91 128 92 129 $(DIR_OBJ)/%.o : %.c 93 130 @\ 94 131 $(ECHO) "Compilation : $*.c"; \ 95 $( OR32_CC) $(OR32_CC_OPT) -o $@ -c $^ ;96 # $( OR32_CC) $(OR32_CC_OPT) -S -o $@.s -c $^ ;132 $($(TARGET)_CC) $($(TARGET)_CC_OPT) -o $@ -c $^ ; 133 # $($(TARGET)_CC) $($(TARGET)_CC_OPT) -S -o $@.s -c $^ ; 97 134 98 135 $(DIR_BIN) $(DIR_OBJ) :
Note: See TracChangeset
for help on using the changeset viewer.