Subversion Repositories HelenOS

Rev

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

Rev 3005 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
ifeq ($(IMAGE),binary)
-
 
36
	LD_IN = binary
-
 
37
endif
-
 
38
ifeq ($(IMAGE),ecoff)
-
 
39
	LD_IN = ecoff
-
 
40
endif
-
 
41
BFD_NAME = elf32-tradlittlemips
-
 
42
BFD_ARCH = mips
35
TARGET = mipsel-linux-gnu
43
TARGET = mipsel-linux-gnu
36
TOOLCHAIN_DIR = /usr/local/mipsel/bin
44
TOOLCHAIN_DIR = /usr/local/mipsel/bin
37
 
45
 
38
ifeq ($(COMPILER),gcc_native)
46
ifeq ($(COMPILER),gcc_native)
39
	CC = gcc
47
	CC = gcc
Line 41... Line 49...
41
	LD = ld
49
	LD = ld
42
	OBJCOPY = objcopy
50
	OBJCOPY = objcopy
43
	OBJDUMP = objdump
51
	OBJDUMP = objdump
44
endif
52
endif
45
 
53
 
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)
54
ifeq ($(COMPILER),gcc_cross)
55
	CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
55
	CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
56
	AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
56
	AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
57
	LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
57
	LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
58
	OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
58
	OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
Line 70... Line 70...
70
endif
70
endif
71
 
71
 
72
SOURCES = \
72
SOURCES = \
73
	main.c \
73
	main.c \
74
	msim.c \
74
	msim.c \
-
 
75
	_components.c \
75
	../../../generic/printf.c \
76
	../../../generic/printf.c \
76
	asm.S \
77
	asm.S \
77
	boot.S
78
	boot.S
78
 
79
 
79
COMPONENTS = \
80
COMPONENTS = \
Line 107... Line 108...
107
 
108
 
108
depend:
109
depend:
109
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
110
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
110
 
111
 
111
clean:
112
clean:
112
	-rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
113
	-rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
-
 
114
 
-
 
115
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
-
 
116
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS)
113
 
117
 
114
_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
118
_link.ld.in: _link.ld.in.$(LD_IN)
115
	./pack $(IMAGE) $(OBJCOPY) $(COMPONENTS)
119
	cp $< $@
116
 
120
 
117
%.o: %.S
121
%.o: %.S
118
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
122
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
119
 
123
 
120
%.o: %.c
124
%.o: %.c