Rev 2454 | Rev 2460 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2454 | Rev 2455 | ||
---|---|---|---|
Line 127... | Line 127... | ||
127 | ## Toolchain configuration |
127 | ## Toolchain configuration |
128 | # |
128 | # |
129 | 129 | ||
130 | ifeq ($(COMPILER),gcc_native) |
130 | ifeq ($(COMPILER),gcc_native) |
131 | CC = gcc |
131 | CC = gcc |
132 | AS_CC = gcc |
132 | GCC = gcc |
133 | AS = as |
133 | AS = as |
134 | LD = ld |
134 | LD = ld |
135 | OBJCOPY = objcopy |
135 | OBJCOPY = objcopy |
136 | OBJDUMP = objdump |
136 | OBJDUMP = objdump |
137 | LIBDIR = /usr/lib |
137 | LIBDIR = /usr/lib |
138 | CFLAGS = $(GCC_CFLAGS) |
138 | CFLAGS = $(GCC_CFLAGS) |
139 | endif |
139 | endif |
140 | 140 | ||
141 | ifeq ($(COMPILER),icc_native) |
141 | ifeq ($(COMPILER),icc_native) |
142 | CC = icc |
142 | CC = icc |
143 | AS_CC = gcc |
143 | GCC = gcc |
144 | AS = as |
144 | AS = as |
145 | LD = ld |
145 | LD = ld |
146 | OBJCOPY = objcopy |
146 | OBJCOPY = objcopy |
147 | OBJDUMP = objdump |
147 | OBJDUMP = objdump |
148 | LIBDIR = /usr/lib |
148 | LIBDIR = /usr/lib |
149 | CFLAGS = $(GCC_CFLAGS) |
149 | CFLAGS = $(GCC_CFLAGS) |
150 | endif |
150 | endif |
151 | 151 | ||
152 | ifeq ($(COMPILER),suncc_native) |
152 | ifeq ($(COMPILER),suncc_native) |
153 | CC = suncc |
153 | CC = suncc |
154 | AS_CC = gcc |
154 | GCC = gcc |
155 | AS = as |
155 | AS = as |
156 | LD = ld |
156 | LD = ld |
157 | OBJCOPY = objcopy |
157 | OBJCOPY = objcopy |
158 | OBJDUMP = objdump |
158 | OBJDUMP = objdump |
159 | LIBDIR = /usr/lib |
159 | LIBDIR = /usr/lib |
160 | CFLAGS = $(SUNCC_CFLAGS) |
160 | CFLAGS = $(SUNCC_CFLAGS) |
161 | endif |
161 | endif |
162 | 162 | ||
163 | ifeq ($(COMPILER),gcc_cross) |
163 | ifeq ($(COMPILER),gcc_cross) |
164 | CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc |
164 | CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc |
165 | AS_CC = $(CC) |
165 | GCC = $(CC) |
166 | AS = $(TOOLCHAIN_DIR)/bin/$(TARGET)-as |
166 | AS = $(TOOLCHAIN_DIR)/bin/$(TARGET)-as |
167 | LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld |
167 | LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld |
168 | OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy |
168 | OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy |
169 | OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump |
169 | OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump |
170 | LIBDIR = $(TOOLCHAIN_DIR)/lib |
170 | LIBDIR = $(TOOLCHAIN_DIR)/lib |
Line 319... | Line 319... | ||
319 | 319 | ||
320 | depend: archlinks |
320 | depend: archlinks |
321 | -makedepend $(DEFS) $(CFLAGS) -f - $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
321 | -makedepend $(DEFS) $(CFLAGS) -f - $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
322 | 322 | ||
323 | arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
323 | arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
324 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@ |
324 | $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@ |
325 | 325 | ||
326 | generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) |
326 | generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) |
327 | $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab Makefile generic/src/debug/empty_map.o |
327 | $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab Makefile generic/src/debug/empty_map.o |
328 | $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre |
328 | $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre |
329 | $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
329 | $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
Line 346... | Line 346... | ||
346 | 346 | ||
347 | disasm: kernel.raw |
347 | disasm: kernel.raw |
348 | $(OBJDUMP) -d kernel.raw > kernel.disasm |
348 | $(OBJDUMP) -d kernel.raw > kernel.disasm |
349 | 349 | ||
350 | %.o: %.S |
350 | %.o: %.S |
351 | $(AS_CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
351 | $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@ |
352 | 352 | ||
353 | %.o: %.s |
353 | %.o: %.s |
354 | $(AS) $(AFLAGS) $< -o $@ |
354 | $(AS) $(AFLAGS) $< -o $@ |
355 | 355 | ||
356 | %.o: %.c |
356 | %.o: %.c |