Rev 2927 | Rev 3132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2927 | Rev 3107 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | include ../../../Makefile.config |
30 | include ../../../Makefile.config |
31 | 31 | ||
32 | ## Toolchain configuration |
32 | ## Toolchain configuration |
33 | # |
33 | # |
34 | 34 | ||
- | 35 | ifeq ($(IMAGE),binary) |
|
- | 36 | LD_IN = binary |
|
- | 37 | endif |
|
- | 38 | ifeq ($(IMAGE),ecoff) |
|
- | 39 | LD_IN = ecoff |
|
- | 40 | endif |
|
- | 41 | BFD_NAME = elf32-tradlittlemips |
|
- | 42 | BFD_ARCH = mips |
|
35 | TARGET = mipsel-linux-gnu |
43 | TARGET = mipsel-linux-gnu |
36 | TOOLCHAIN_DIR = /usr/local/mipsel/bin |
44 | TOOLCHAIN_DIR = /usr/local/mipsel/bin |
37 | 45 | ||
38 | ifeq ($(COMPILER),gcc_native) |
46 | ifeq ($(COMPILER),gcc_native) |
39 | CC = gcc |
47 | CC = gcc |
Line 41... | Line 49... | ||
41 | LD = ld |
49 | LD = ld |
42 | OBJCOPY = objcopy |
50 | OBJCOPY = objcopy |
43 | OBJDUMP = objdump |
51 | OBJDUMP = objdump |
44 | endif |
52 | endif |
45 | 53 | ||
46 | ifeq ($(COMPILER),icc_native) |
- | |
47 | CC = icc |
- | |
48 | AS = as |
- | |
49 | LD = ld |
- | |
50 | OBJCOPY = objcopy |
- | |
51 | OBJDUMP = objdump |
- | |
52 | endif |
- | |
53 | - | ||
54 | ifeq ($(COMPILER),gcc_cross) |
54 | ifeq ($(COMPILER),gcc_cross) |
55 | CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc |
55 | CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc |
56 | AS = $(TOOLCHAIN_DIR)/$(TARGET)-as |
56 | AS = $(TOOLCHAIN_DIR)/$(TARGET)-as |
57 | LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld |
57 | LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld |
58 | OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
58 | OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
Line 70... | Line 70... | ||
70 | endif |
70 | endif |
71 | 71 | ||
72 | SOURCES = \ |
72 | SOURCES = \ |
73 | main.c \ |
73 | main.c \ |
74 | msim.c \ |
74 | msim.c \ |
- | 75 | _components.c \ |
|
75 | ../../../generic/printf.c \ |
76 | ../../../generic/printf.c \ |
76 | asm.S \ |
77 | asm.S \ |
77 | boot.S |
78 | boot.S |
78 | 79 | ||
79 | COMPONENTS = \ |
80 | COMPONENTS = \ |
Line 105... | Line 106... | ||
105 | 106 | ||
106 | depend: |
107 | depend: |
107 | -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
108 | -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
108 | 109 | ||
109 | clean: |
110 | clean: |
110 | -rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend |
111 | -rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend |
- | 112 | ||
- | 113 | _components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in |
|
- | 114 | ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) |
|
111 | 115 | ||
112 | _components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) |
116 | _link.ld.in: _link.ld.in.$(LD_IN) |
113 | ./pack $(IMAGE) $(OBJCOPY) $(COMPONENTS) |
117 | cp $< $@ |
114 | 118 | ||
115 | %.o: %.S |
119 | %.o: %.S |
116 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
120 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
117 | 121 | ||
118 | %.o: %.c |
122 | %.o: %.c |