Rev 2927 | Rev 3149 | 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 | BFD_NAME = elf64-sparc |
|
- | 36 | BFD_ARCH = sparc |
|
35 | TARGET = sparc64-linux-gnu |
37 | TARGET = sparc64-linux-gnu |
36 | TOOLCHAIN_DIR = /usr/local/sparc64/bin |
38 | TOOLCHAIN_DIR = /usr/local/sparc64/bin |
37 | 39 | ||
38 | ifeq ($(COMPILER),gcc_native) |
40 | ifeq ($(COMPILER),gcc_native) |
39 | CC = gcc |
41 | CC = gcc |
Line 41... | Line 43... | ||
41 | LD = ld |
43 | LD = ld |
42 | OBJCOPY = objcopy |
44 | OBJCOPY = objcopy |
43 | OBJDUMP = objdump |
45 | OBJDUMP = objdump |
44 | endif |
46 | endif |
45 | 47 | ||
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) |
48 | ifeq ($(COMPILER),gcc_cross) |
55 | CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc |
49 | CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc |
56 | AS = $(TOOLCHAIN_DIR)/$(TARGET)-as |
50 | AS = $(TOOLCHAIN_DIR)/$(TARGET)-as |
57 | LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld |
51 | LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld |
58 | OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
52 | OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
Line 69... | Line 63... | ||
69 | CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
63 | CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
70 | endif |
64 | endif |
71 | 65 | ||
72 | SOURCES = \ |
66 | SOURCES = \ |
73 | main.c \ |
67 | main.c \ |
- | 68 | _components.c \ |
|
74 | ../../../generic/printf.c \ |
69 | ../../../generic/printf.c \ |
75 | ../../../generic/string.c \ |
70 | ../../../generic/string.c \ |
76 | ../../../genarch/balloc.c \ |
71 | ../../../genarch/balloc.c \ |
77 | ../../../genarch/ofw.c \ |
72 | ../../../genarch/ofw.c \ |
78 | ../../../genarch/ofw_tree.c \ |
73 | ../../../genarch/ofw_tree.c \ |
Line 109... | Line 104... | ||
109 | 104 | ||
110 | depend: |
105 | depend: |
111 | -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
106 | -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
112 | 107 | ||
113 | clean: |
108 | clean: |
114 | -rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot boot.disasm Makefile.depend |
109 | -rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot image.map image.disasm Makefile.depend |
115 | 110 | ||
116 | _components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) |
111 | _components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in |
117 | ./pack $(IMAGE) $(OBJCOPY) $(COMPONENTS) |
112 | ../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 1 "unsigned long" $(COMPONENTS) |
118 | 113 | ||
119 | %.o: %.S |
114 | %.o: %.S |
120 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
115 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
121 | 116 | ||
122 | %.o: %.c |
117 | %.o: %.c |
123 | $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |
118 | $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |
124 | 119 | ||
125 | disasm: image.boot |
120 | disasm: image.boot |
126 | $(OBJDUMP) -d image.boot > boot.disasm |
121 | $(OBJDUMP) -d image.boot > image.disasm |