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 3197
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 \
-
 
89
	$(USPACEDIR)/srv/devmap/devmap \
-
 
90
	$(USPACEDIR)/app/init/init \
-
 
91
	$(USPACEDIR)/app/tetris/tetris \
95
	$(USPACEDIR)/app/tetris/tetris \
92
	$(USPACEDIR)/app/tester/tester \
96
	$(USPACEDIR)/app/tester/tester \
93
	$(USPACEDIR)/app/klog/klog \
97
	$(USPACEDIR)/app/klog/klog \
94
	$(USPACEDIR)/app/cli/cli
98
	$(USPACEDIR)/app/cli/cli
95
 
99
 
Line 100... Line 104...
100
 
104
 
101
all: image.boot
105
all: image.boot
102
 
106
 
103
-include Makefile.depend
107
-include Makefile.depend
104
 
108
 
105
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS)
109
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS)
106
	$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@
110
	$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@
107
 
111
 
108
depend:
112
depend:
109
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
113
	-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
110
 
114
 
111
clean:
115
clean:
-
 
116
	-for task in $(RD_TASKS) ; do \
-
 
117
		rm -f $(USPACEDIR)/dist/sbin/`basename $$task` ; \
-
 
118
	done
112
	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
119
	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend
113
 
120
 
114
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
121
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) _link.ld.in
-
 
122
	for task in $(RD_TASKS) ; do \
-
 
123
		cp $$task $(USPACEDIR)/dist/sbin/ ; \
-
 
124
	done
-
 
125
	../../../../tools/mktmpfs.py 4096 $(USPACEDIR)/dist/ initrd.img
115
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS)
126
	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned int" $(COMPONENTS) ./initrd.img
116
 
127
 
117
%.o: %.S
128
%.o: %.S
118
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
129
	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
119
 
130
 
120
%.o: %.c
131
%.o: %.c