Subversion Repositories HelenOS-historic

Rev

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

Rev 621 Rev 651
Line 175... Line 175...
175
archlinks:
175
archlinks:
176
	ln -sfn ../../arch/$(ARCH)/include/ generic/include/arch
176
	ln -sfn ../../arch/$(ARCH)/include/ generic/include/arch
177
	ln -sfn ../../genarch/include/ generic/include/genarch
177
	ln -sfn ../../genarch/include/ generic/include/genarch
178
 
178
 
179
depend: archlinks
179
depend: archlinks
180
	-makedepend $(DEFS) $(CFLAGS) -f - $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) >Makefile.depend 2>/dev/null
180
	-makedepend $(DEFS) $(CFLAGS) -f - $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null
181
	#$(CC) $(DEFS) $(CFLAGS) -M $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend
-
 
182
 
181
 
183
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in
182
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in
184
	$(CC) $(DEFS) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
183
	$(CC) $(DEFS) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
185
 
184
 
186
generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
185
generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
Line 192... Line 191...
192
	# on architectures, that have bss after symtab
191
	# on architectures, that have bss after symtab
193
	$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab generic/src/debug/real_map.bin generic/src/debug/sizeok_map.o
192
	$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab generic/src/debug/real_map.bin generic/src/debug/sizeok_map.o
194
	$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre
193
	$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre
195
	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump
194
	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump
196
	tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin 
195
	tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin 
197
	
-
 
198
 
196
 
199
generic/src/debug/real_map.o: generic/src/debug/real_map.bin
197
generic/src/debug/real_map.o: generic/src/debug/real_map.bin
200
	$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab $< $@
198
	$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab $< $@
201
 
199
 
202
kernel.raw: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o
200
kernel.raw: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o
Line 204... Line 202...
204
 
202
 
205
kernel.bin: kernel.raw
203
kernel.bin: kernel.raw
206
	$(OBJCOPY) -O $(BFD) kernel.raw kernel.bin
204
	$(OBJCOPY) -O $(BFD) kernel.raw kernel.bin
207
 
205
 
208
boot: kernel.bin
206
boot: kernel.bin
209
	$(MAKE) -C arch/$(ARCH)/boot build KERNEL_SIZE="`cat kernel.bin | wc -c`" CC=$(CC) AS=$(AS) LD=$(LD)
207
	if [ -d arch/$(ARCH)/boot ] ; then $(MAKE) -C arch/$(ARCH)/boot build KERNEL_SIZE="`cat kernel.bin | wc -c`" CC=$(CC) AS=$(AS) LD=$(LD) ; fi
210
 
208
 
211
disasm: kernel.raw
209
disasm: kernel.raw
212
	$(OBJDUMP) -d kernel.raw > kernel.disasm
210
	$(OBJDUMP) -d kernel.raw > kernel.disasm
213
 
211
 
214
%.o: %.S
212
%.o: %.S