diff options
author | Alexis211 <alexis211@gmail.com> | 2010-01-25 18:38:43 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2010-01-25 18:38:43 +0100 |
commit | 4ae83c83f34759172e9c575c8ac875011bfaff2d (patch) | |
tree | 26ec6c665cbada6e413bd31e34c60d7c2bbb41c3 /src/stem/Makefile | |
download | TCE-4ae83c83f34759172e9c575c8ac875011bfaff2d.tar.gz TCE-4ae83c83f34759172e9c575c8ac875011bfaff2d.zip |
First commit
Diffstat (limited to 'src/stem/Makefile')
-rw-r--r-- | src/stem/Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/stem/Makefile b/src/stem/Makefile new file mode 100644 index 0000000..94e2000 --- /dev/null +++ b/src/stem/Makefile @@ -0,0 +1,35 @@ + +CC = gcc +CFLAGS = -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-stack-protector -Wall -Wextra + +LD = ld +LDFLAGS = -T link.ld + +ASM = nasm +AFLAGS = -f elf + +OBJECTS = loader_.o kmain.o sys.o \ + monitor.o timer.o \ + idt.o idt_.o task.o task_.o\ + lib/stdlib.o lib/bitset.o \ + mem.o paging.o gdt.o heap.o +OUT = stem.elf + +all: $(OBJECTS) + echo "* Linking $(OUT)..." + $(LD) $(LDFLAGS) $(OBJECTS) -o $(OUT) -Map stem.map + +clean: + rm *.o || exit 0 + rm $(OBJECTS) || exit 0 + +mrproper: clean + rm $(OUT) + +%.o: %.asm + echo "* Compiling $<..." + $(ASM) $(AFLAGS) -o $@ $< + +%.o: %.c + echo "* Compiling $<..." + $(CC) -c $< -o $@ $(CFLAGS) |