Subversion Repositories HelenOS

Rev

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

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