Subversion Repositories HelenOS

Rev

Rev 3102 | Rev 3149 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3102 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 = elf32-powerpc
-
 
36
BFD_ARCH = powerpc:common
35
TARGET = ppc-linux-gnu
37
TARGET = ppc-linux-gnu
36
TOOLCHAIN_DIR = /usr/local/ppc/bin
38
TOOLCHAIN_DIR = /usr/local/ppc/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 70... Line 64...
70
endif
64
endif
71
 
65
 
72
SOURCES = \
66
SOURCES = \
73
	main.c \
67
	main.c \
74
	ofwarch.c \
68
	ofwarch.c \
-
 
69
	_components.c \
75
	../../../genarch/ofw.c \
70
	../../../genarch/ofw.c \
76
	../../../generic/printf.c \
71
	../../../generic/printf.c \
77
	asm.S \
72
	asm.S \
78
	boot.S
73
	boot.S
79
 
74
 
Line 106... Line 101...
106
 
101
 
107
depend:
102
depend:
108
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
103
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
109
 
104
 
110
clean:
105
clean:
111
	-rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
106
	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
112
 
107
 
113
_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
108
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
114
	./pack $(OBJCOPY) $(COMPONENTS)
109
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS)
115
 
110
 
116
%.o: %.S
111
%.o: %.S
117
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
112
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
118
 
113
 
119
%.o: %.c
114
%.o: %.c