Subversion Repositories HelenOS

Rev

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

Rev 2832 Rev 3042
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 107... Line 102...
107
 
102
 
108
depend:
103
depend:
109
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
104
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
110
 
105
 
111
clean:
106
clean:
112
	-rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
107
	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
113
 
108
 
114
_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
109
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
115
	./pack $(OBJCOPY) $(COMPONENTS)
110
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS)
116
 
111
 
117
%.o: %.S
112
%.o: %.S
118
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
113
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
119
 
114
 
120
%.o: %.c
115
%.o: %.c