Changeset 138 for trunk/Softwares/Makefile.Software
- Timestamp:
- May 12, 2010, 7:34:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Softwares/Makefile.Software
r137 r138 20 20 DIR_BIN = bin 21 21 22 EXE = soft 22 EXE = soft_$(OS)_$(TARGET) 23 23 24 24 DIR_COMMON = $(MORPHEO_TOPLEVEL)/Softwares/Common … … 28 28 DIR_COMMON_INC = $(DIR_COMMON)/include 29 29 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 #PREFIX_OBJ = $(OS)_$(TARGET)_ 31 # 32 #SOURCES_COMMON = $(wildcard $(DIR_COMMON_SYS)/*.s)\ 33 # $(wildcard $(DIR_COMMON_ASM)/*.s)\ 34 # $(wildcard $(DIR_COMMON_C)/*.c) 35 # 36 #TEST = $(addprefix $(DIR_OBJ)/$(PREFIX_OBJ), $(addsuffix .o, $(basename $(notdir $(SOURCES_COMMON))))) 33 37 38 OBJECTS_COMMON = $(patsubst $(DIR_COMMON_SYS)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_SYS)/*.s))\ 39 $(patsubst $(DIR_COMMON_ASM)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_ASM)/*.s))\ 40 $(patsubst $(DIR_COMMON_C)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_COMMON_C)/*.c)) 34 41 35 42 #-----[ To the compilation ]------------------------------------------------------ … … 49 56 UNIX_OBJECTS = 50 57 58 #~~~~~[ TARGET : COMMON ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 COMMON_OPTIMIZE = -O3 -std=c99 -Wall -Wlong-long 60 61 COMMON_CC_OPT = $(INCDIR) -D$(OS) -D$(TARGET) $($(TARGET)_OPTIMIZE) $(FLAGS) 62 COMMON_AS_OPT = 63 COMMON_LD_OPT = $(LIBDIR) $(LIBNAME) -static 64 COMMON_OBJDUMP_OPT = -D 65 COMMON_NM_OPT = -n 51 66 52 67 #~~~~~[ TARGET : MORPHEO ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 53 54 MORPHEO_OPTIMIZE = -O3 -std=c99 -fomit-frame-pointer -fdelayed-branch -mror -mcmov -msext -mhard-mul -msoft-div -msoft-float 68 MORPHEO_OPTIMIZE = $(COMMON_OPTIMIZE) -fomit-frame-pointer -fdelayed-branch -mror -mcmov -msext -mhard-mul -msoft-div -msoft-float 55 69 56 70 #Option : … … 69 83 70 84 # Tools 71 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 85 PREFIX_MORPHEO = or32-elf- 86 87 MORPHEO_CC = $(OR1K_BIN)/$(PREFIX_MORPHEO)gcc 88 MORPHEO_AS = $(OR1K_BIN)/$(PREFIX_MORPHEO)as 89 MORPHEO_LD = $(OR1K_BIN)/$(PREFIX_MORPHEO)ld 90 MORPHEO_OBJDUMP = $(OR1K_BIN)/$(PREFIX_MORPHEO)objdump 91 MORPHEO_NM = $(OR1K_BIN)/$(PREFIX_MORPHEO)nm 76 92 77 93 # Tools's option 78 MORPHEO_CC_OPT = -Wall $(INCDIR) $(MORPHEO_OPTIMIZE) -Wlong-long -DMorpheo $(FLAGS) 79 # -DHAVE_LIBC 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 94 MORPHEO_CC_OPT = $(COMMON_CC_OPT) 95 MORPHEO_AS_OPT = $(COMMON_AS_OPT) 96 MORPHEO_LD_OPT = $(COMMON_LD_OPT) -T$(DIR_LDSCRIPT)/or32.ld $(OR1K_LIBDIR) $(OR1K_LIBNAME) 97 MORPHEO_OBJDUMP_OPT = $(COMMON_OBJDUMP_OPT) 98 MORPHEO_NM_OPT = $(COMMON_NM_OPT) 84 99 85 100 #~~~~~[ TARGET : x86 ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 87 x86_OPTIMIZE = -O3 -std=c99 101 x86_OPTIMIZE = $(COMMON_OPTIMIZE) 88 102 89 103 x86_CC = gcc … … 93 107 x86_NM = nm 94 108 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 109 x86_CC_OPT = $(COMMON_CC_OPT) 110 x86_AS_OPT = $(COMMON_AS_OPT) 111 x86_LD_OPT = $(COMMON_LD_OPT) 112 x86_OBJDUMP_OPT = $(COMMON_OBJDUMP_OPT) 113 x86_NM_OPT = $(COMMON_NM_OPT) 114 115 #~~~~~[ TARGET : EV67 ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 EV67_OPTIMIZE = $(COMMON_OPTIMIZE) -mtune="ev4" 117 118 PREFIX_EV67 = alphaev67-unknown-linux-gnu- 119 #PREFIX_EV67 = alpha-unknown-linux-gnu- 120 121 EV67_CC = $(EV67_BIN)/$(PREFIX_EV67)gcc 122 EV67_AS = $(EV67_BIN)/$(PREFIX_EV67)as 123 EV67_LD = $(EV67_BIN)/$(PREFIX_EV67)gcc 124 EV67_OBJDUMP = $(EV67_BIN)/$(PREFIX_EV67)objdump 125 EV67_NM = $(EV67_BIN)/$(PREFIX_EV67)nm 126 127 EV67_CC_OPT = $(COMMON_CC_OPT) 128 EV67_AS_OPT = $(COMMON_AS_OPT) 129 EV67_LD_OPT = $(COMMON_LD_OPT) 130 EV67_OBJDUMP_OPT = $(COMMON_OBJDUMP_OPT) 131 EV67_NM_OPT = $(COMMON_NM_OPT) 100 132 101 133 #-----[ Rules ]------------------------------------------------------------------- … … 114 146 $(MAKE) $(OBJECTS); \ 115 147 $(ECHO) "Linkage : $*.x"; \ 116 $($(TARGET)_LD) -o $@ $(OBJECTS) $($(TARGET)_LD_OPT); 148 $($(TARGET)_LD) -o $@ $(OBJECTS) $($(TARGET)_LD_OPT); \ 117 149 $(ECHO) "List symbols : $*.x.nm"; \ 118 150 $($(TARGET)_NM) $($(TARGET)_NM_OPT) $@ > $@.nm; \
Note: See TracChangeset
for help on using the changeset viewer.