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 = 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 110... Line 105...
110
 
105
 
111
depend:
106
depend:
112
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
107
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
113
 
108
 
114
clean:
109
clean:
115
	-rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot boot.disasm Makefile.depend
110
	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot image.map image.disasm Makefile.depend
116
 
111
 
117
_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
112
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
118
	./pack $(IMAGE) $(OBJCOPY) $(COMPONENTS)
113
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 1 "unsigned long" $(COMPONENTS)
119
 
114
 
120
%.o: %.S
115
%.o: %.S
121
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
116
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
122
 
117
 
123
%.o: %.c
118
%.o: %.c
124
	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
119
	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
125
 
120
 
126
disasm: image.boot
121
disasm: image.boot
127
	$(OBJDUMP) -d image.boot > boot.disasm
122
	$(OBJDUMP) -d image.boot > image.disasm