Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 2cea1ba290
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (30 sloc) 0.664 kB
# MAkefile for tutorials from
# http://www.jamesmolloy.co.uk/tutorial_html/1.-Environment%20setup.html
OBJS=obj/boot.o \
obj/main.o \
obj/common.o \
obj/monitor.o \
obj/string.o \
obj/printf.o
KERNEL=bin/kernel
CFLAGS=-m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector
LDFLAGS=-melf_i386 -Tlink.ld
ASFLAGS=-felf
all: link image run
image: link
./update_image.sh
run: image
./run_bochs.sh
obj:
-mkdir obj
clean:
-rm *.o $(KERNEL)
link: obj $(OBJS) bin
ld $(LDFLAGS) -o $(KERNEL) $(OBJS)
bin:
-mkdir bin
obj/%.o: src/%.s
nasm $(ASFLAGS) $<
mv $(patsubst %.s,%.o,$<) $@
obj/%.o: src/%.c
gcc $(CFLAGS) -o $@ -c $<
Jump to Line
Something went wrong with that request. Please try again.