Rev 1275 | Rev 1602 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1275 | Rev 1369 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | ofw.c \ |
54 | ofw.c \ |
55 | printf.c \ |
55 | printf.c \ |
56 | asm.S \ |
56 | asm.S \ |
57 | boot.S |
57 | boot.S |
58 | 58 | ||
- | 59 | COMPONENTS = \ |
|
- | 60 | $(KERNELDIR)/kernel.bin \ |
|
- | 61 | $(USPACEDIR)/ns/ns \ |
|
- | 62 | $(USPACEDIR)/init/init \ |
|
- | 63 | $(USPACEDIR)/fb/fb |
|
- | 64 | ||
59 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
65 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
- | 66 | COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
|
60 | 67 | ||
61 | .PHONY: all clean depend |
68 | .PHONY: all clean depend |
62 | 69 | ||
63 | all: image.boot |
70 | all: image.boot |
64 | 71 | ||
65 | -include Makefile.depend |
72 | -include Makefile.depend |
66 | 73 | ||
67 | image.boot: depend $(OBJECTS) kernel.o init.o |
74 | image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) kernel.o |
68 | $(LD) -no-check-sections -N -T _link.ld $(OBJECTS) kernel.o init.o -o $@ |
75 | $(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@ |
69 | 76 | ||
70 | depend: |
77 | depend: |
71 | -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
78 | -makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
72 | 79 | ||
73 | clean: |
80 | clean: |
74 | -rm -f $(OBJECTS) image.boot kernel.o init.o Makefile.depend |
81 | -rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend |
75 | - | ||
76 | kernel.o: $(KERNEL) |
- | |
77 | $(OBJCOPY) -I binary -O elf32-powerpc -B powerpc:common --rename-section .data=.kernel_image $(KERNEL) $@ |
- | |
78 | 82 | ||
79 | init.o: $(INIT) |
83 | _components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) |
80 | $(OBJCOPY) -I binary -O elf32-powerpc -B powerpc:common --rename-section .data=.init_image $(INIT) $@ |
84 | ./pack $(OBJCOPY) $(COMPONENTS) |
81 | 85 | ||
82 | %.o: %.S |
86 | %.o: %.S |
83 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
87 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
84 | 88 | ||
85 | %.o: %.c |
89 | %.o: %.c |