Subversion Repositories HelenOS-historic

Rev

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

Rev 885 Rev 887
Line 45... Line 45...
45
	OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
45
	OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
46
	OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
46
	OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
47
endif
47
endif
48
 
48
 
49
CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
49
CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
-
 
50
DEFS = 
50
 
51
 
51
SOURCES = \
52
SOURCES = \
52
	main.c \
53
	main.c \
53
	ofw.c \
54
	ofw.c \
54
	printf.c \
55
	printf.c \
55
	boot.S
56
	boot.S
56
 
57
 
57
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
58
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
58
 
59
 
-
 
60
.PHONY: all clean depend
-
 
61
 
-
 
62
all: ../image.boot
-
 
63
 
-
 
64
-include Makefile.depend
-
 
65
 
59
loader.bin: $(OBJECTS)
66
../image.boot: depend $(OBJECTS) kernel.o
60
	$(LD) -no-check-sections -N -T _link.ld $(OBJECTS) -o $@
67
	$(LD) -no-check-sections -N -T _link.ld $(OBJECTS) kernel.o -o $@
-
 
68
 
-
 
69
depend:
-
 
70
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
61
 
71
 
62
clean:
72
clean:
63
	-rm -f $(OBJECTS) loader.bin
73
	-rm -f $(OBJECTS) ../image.boot kernel.o Makefile.depend
-
 
74
 
-
 
75
kernel.o: $(KERNEL)
-
 
76
	$(OBJCOPY) -I binary -O elf32-powerpc -B powerpc $(KERNEL) $@
64
 
77
 
65
%.o: %.S
78
%.o: %.S
66
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
79
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
67
 
80
 
68
%.o: %.c
81
%.o: %.c