summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-14 03:36:29 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-14 03:36:29 +0100
commit2761b620043ad511d9baf66d5478a463aeece77b (patch)
tree108c7c32fcc068fe1fee5ffdc03fc8afbf89cfc0 /Makefile
parent03fb41e835ff4d10325351c1460e9445e4b572ca (diff)
minur improvement
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 9 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 87ecc15..62b053e 100644
--- a/Makefile
+++ b/Makefile
@@ -17,13 +17,11 @@ KERNEL_START=0x100000
CC=i686-elf-gcc
############ compiler flags ############
-
CFLAGS=
CFLAGS+=-ffreestanding
CFLAGS+=-nostdlib
CFLAGS+=-std=gnu11
CFLAGS+= -I.
-
#CFLAGS+=-lgcc
CFLAGS+=-Werror-implicit-function-declaration
#CFLAGS+= -O4
@@ -33,8 +31,8 @@ CFLAGS+=-Werror-implicit-function-declaration
############ source and object files ############
#kernel sources (asm and c)
-
-SOURCES=$(wildcard ./kernel/*.c)
+SOURCES=
+SOURCES+=$(wildcard ./kernel/*.c)
SOURCES+=$(wildcard ./video/*.c)
SOURCES+=$(wildcard ./lib/*/*.c)
SOURCES+=$(wildcard ./fs/*.c)
@@ -42,14 +40,16 @@ SOURCES+=$(wildcard ./fs/*.c)
ASMSOURCES=$(wildcard ./asm/*.asm)
#kernel object files
-
OBJECTS=$(patsubst %.c, %.o, $(SOURCES))
-DEPS=$(patsubst %.c, %.d, $(SOURCES))
ASMOBJECTS=$(patsubst %.asm, %.o, $(ASMSOURCES))
KERNEL_ENTRY=./boot/kernel_entry.o
+# deps
+DEPS=$(patsubst %.c, %.d, $(SOURCES))
+
############ final image (default target) ############
all: FoolOS.vdi
+
new: clean all
newrun: clean run
@@ -72,6 +72,9 @@ MP_BIN=./boot/mp.bin
#some fillup data (zeros)
FILLUP=./data/fill.bin
+####### userspace #########
+userspace/ext2.img:
+ make -C userspace
############ linking kernel binary ############
@@ -137,7 +140,3 @@ release: new
-mv FoolOS.img release/
make clean_release
-####### userspace #########
-userspace/ext2.img:
- make -C userspace
-