summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..df8bff9
--- /dev/null
+++ b/makefile
@@ -0,0 +1,17 @@
+CC = powerpc64-unknown-linux-gnu-gcc
+LD = powerpc64-unknown-linux-gnu-ld
+
+CFLAGS = -O3
+
+OBJECTS = start.o kernel.o
+
+all: kernel.elf kernel.bin
+
+kernel.elf: ${OBJECTS} kernel.ld
+ ${LD} ${LDFLAGS} ${OBJECTS} -T kernel.ld -o kernel.elf
+
+kernel.bin: ${OBJECTS} kernel.ld
+ ${LD} ${LDFLAGS} ${OBJECTS} --oformat=binary -T kernel.ld -o kernel.bin
+
+clean:
+ (rm -f ${OBJECTS} kernel.elf kernel.bin)
OpenPOWER on IntegriCloud