Subversion Repositories HelenOS

Rev

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

Rev 3157 Rev 3199
Line 79... Line 79...
79
 
79
 
80
COMPONENTS = \
80
COMPONENTS = \
81
	$(KERNELDIR)/kernel.bin \
81
	$(KERNELDIR)/kernel.bin \
82
	$(USPACEDIR)/srv/ns/ns \
82
	$(USPACEDIR)/srv/ns/ns \
83
	$(USPACEDIR)/srv/loader/loader \
83
	$(USPACEDIR)/srv/loader/loader \
-
 
84
	$(USPACEDIR)/app/init/init \
-
 
85
	$(USPACEDIR)/srv/devmap/devmap \
-
 
86
	$(USPACEDIR)/srv/rd/rd \
-
 
87
	$(USPACEDIR)/srv/vfs/vfs \
-
 
88
	$(USPACEDIR)/srv/fs/tmpfs/tmpfs
-
 
89
 
-
 
90
RD_TASKS = \
84
	$(USPACEDIR)/srv/fb/fb \
91
	$(USPACEDIR)/srv/fb/fb \
85
	$(USPACEDIR)/srv/kbd/kbd \
92
	$(USPACEDIR)/srv/kbd/kbd \
86
	$(USPACEDIR)/srv/console/console \
93
	$(USPACEDIR)/srv/console/console \
87
	$(USPACEDIR)/srv/vfs/vfs \
94
	$(USPACEDIR)/srv/fs/fat/fat \
88
	$(USPACEDIR)/srv/fs/tmpfs/tmpfs \
95
	$(USPACEDIR)/app/tetris/tetris \
89
	$(USPACEDIR)/srv/devmap/devmap \
96
	$(USPACEDIR)/app/tester/tester \
90
	$(USPACEDIR)/app/init/init \
97
	$(USPACEDIR)/app/cli/cli \
91
	$(USPACEDIR)/app/klog/klog \
98
	$(USPACEDIR)/app/klog/klog
92
	$(USPACEDIR)/app/cli/cli
-
 
-
 
99
 
93
 
100
 
94
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
101
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
95
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
102
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
96
 
103
 
97
.PHONY: all clean depend
104
.PHONY: all clean depend
98
 
105
 
99
all: image.boot
106
all: image.boot
100
 
107
 
101
-include Makefile.depend
108
-include Makefile.depend
102
 
109
 
103
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS)
110
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS)
104
	$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@
111
	$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@
105
 
112
 
106
depend:
113
depend:
107
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
114
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
108
 
115
 
109
clean:
116
clean:
-
 
117
	-for task in $(RD_TASKS) ; do \
-
 
118
		rm -f $(USPACEDIR)/dist/sbin/`basename $$task` ; \
-
 
119
	done
110
	-rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
120
	-rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend
111
 
121
 
112
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
122
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) _link.ld.in
-
 
123
	for task in $(RD_TASKS) ; do \
-
 
124
		cp $$task $(USPACEDIR)/dist/sbin/ ; \
-
 
125
	done
-
 
126
	../../../../tools/mktmpfs.py 16384 $(USPACEDIR)/dist/ initrd.img
113
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS)
127
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned int" $(COMPONENTS) ./initrd.img
114
 
128
 
115
_link.ld.in: _link.ld.in.$(LD_IN)
129
_link.ld.in: _link.ld.in.$(LD_IN)
116
	cp $< $@
130
	cp $< $@
117
 
131
 
118
%.o: %.S
132
%.o: %.S