-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 831 Bytes
/
Makefile
File metadata and controls
35 lines (28 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Makefile for fotix
# Copyright (c) 2016 Fotis Koutoulakis
SOURCES=sys/boot.o sys/main.o sys/common.o sys/monitor.o sys/descriptor_tables.o \
sys/isr.o sys/interrupt.o sys/dt_asm.o sys/timer.o sys/kheap.o sys/paging.o \
sys/ordered_array.o sys/fs.o sys/initrd.o sys/task.o sys/process.o sys/syscall.o \
sys/keyboard.o
RAMDISK_INIT=utils/mkinit.c
CFLAGS=-nostdlib -nostdinc -fno-builtin -fno-stack-protector -ffreestanding -m32 -I./
LDFLAGS=-melf_i386 -Tlink.ld
ASFLAGS=-felf
CC=i686-elf-gcc
all: $(SOURCES) link
clean:
rm sys/*.o kernel
rm -rf temp/
rm rd_init
rm initrd.img
link:
ld $(LDFLAGS) -o kernel $(SOURCES)
.s.o:
nasm $(ASFLAGS) $<
ramdisk:
gcc $(RAMDISK_INIT) -o rd_init
mkdir temp
touch temp/test.txt
touch temp/test1.txt
touch temp/test2.txt
./rd_init temp/test.txt temp/test1.txt temp/test2.txt