mirror of
git://projects.qi-hardware.com/iris.git
synced 2025-04-21 12:27:27 +03:00
more
This commit is contained in:
13
Makefile
13
Makefile
@@ -1,6 +1,6 @@
|
||||
load = 0x80000000
|
||||
|
||||
CXXFLAGS = -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -nostdinc -DNUM_THREADS=0
|
||||
CXXFLAGS = -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -nostdinc -DNUM_THREADS=0 -I/usr/include
|
||||
CPPFLAGS = -O5 -Wa,-mips32
|
||||
CROSS = mipsel-linux-gnu-
|
||||
CC = $(CROSS)gcc
|
||||
@@ -22,15 +22,22 @@ PYPP = /usr/bin/pypp
|
||||
uimage: all.raw Makefile
|
||||
mkimage -A MIPS -O Linux -C none -a $(load) -e 0x$(shell /bin/sh -c '$(OBJDUMP) -t all | grep __start$$ | cut -b-8') -n "Shevek's kernel" -d $< $@ | sed -e 's/:/;/g'
|
||||
|
||||
arch.%: mips.%
|
||||
arch.hh: mips.hh
|
||||
ln -s $< $@ || true
|
||||
arch.cc: mips.cc
|
||||
ln -s $< $@ || true
|
||||
|
||||
%.o:%.cc Makefile kernel.hh arch.hh
|
||||
$(CC) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
entry.o: thread0 thread1
|
||||
|
||||
%.o:%.S Makefile
|
||||
$(CC) $(CPPFLAGS) -DKERNEL_STACK_SIZE=0x2000 -c $< -o $@
|
||||
|
||||
%: boot-helper.o boot-programs/%.o
|
||||
$(LD) $^ -o $@
|
||||
|
||||
# entry.o must be the first file. boot.o must be the first of the init objects (which can be dumped after loading).
|
||||
all: entry.o $(subst .cc,.o,$(kernel_sources)) boot.o $(subst .cc,.o,$(boot_sources))
|
||||
$(LD) --omagic -Ttext $(load) $^ -o $@
|
||||
@@ -43,6 +50,6 @@ junk = mdebug.abi32 reginfo comment pdr
|
||||
gzip < $< > $@
|
||||
|
||||
clean:
|
||||
rm -f all uimage *.o all.raw.gz arch.hh
|
||||
rm -f all uimage *.o all.raw.gz arch.hh arch.cc
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
Reference in New Issue
Block a user