diff options
author | Christian Cunningham <cc@localhost> | 2021-11-11 23:06:48 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2021-11-11 23:06:48 -0700 |
commit | 8e63f7a58affbc08bc114e105ee6178d134ef237 (patch) | |
tree | b8bdbd643785635b015585b2de9deddddbcd72f3 /Makefile | |
parent | e2d6c3bdf075147f7c98e0e025d95e238ab2ff9d (diff) |
Updated Make Process
Diffstat (limited to 'Makefile')
l---------[-rw-r--r--] | Makefile | 53 |
1 files changed, 1 insertions, 52 deletions
@@ -1,52 +1 @@ -C_SOURCES = $(wildcard src/*.c) -C_HEADERS = $(wildcard src/*.h) -C_OBJECTS = ${C_SOURCES:.c=.o} -C_OBJECTD = ${subst src,obj,${C_OBJECTS}} -A_SOURCES = $(wildcard src/*.S) -A_OBJECTS = ${A_SOURCES:.S=.o} -A_OBJECTD = ${subst src,obj,${A_OBJECTS}} - -CROSS = arm-none-eabi -CC = ${CROSS}-gcc -AS = ${CROSS}-as -OBJCOPY = ${CROSS}-objcopy -OBJDUMP = ${CROSS}-objdump -QEMU = qemu-system-arm -GDB = gdb-multiarch -CFLAGS = -mcpu=cortex-a7 -fpic -ffreestanding -std=gnu99 -O2 -Wall -Wextra -nostdlib -g -AFLAGS = -mcpu=cortex-a7 -QFLAGS = -M raspi2 -cpu arm1176 -m 1G -serial mon:stdio -nographic - -.PHONY: clean run run-debug debug export - -default: clean build/kernel7.img - -build/kernel7.img: build/kernel.elf - ${OBJCOPY} $< -O binary $@ - -build/kernel.list: build/kernel-g.elf - ${OBJDUMP} -D $< > $@ - -build/kernel-g.elf: ${A_OBJECTD} ${C_OBJECTD} - ${CC} -T linker.ld -o $@ ${CFLAGS} $^ -lgcc - -build/kernel.elf: ${A_OBJECTD} ${C_OBJECTD} - ${CC} -T linker.ld -o $@ -ffreestanding -O2 -nostdlib $^ -lgcc - -export: build/kernel.list - cp build/kernel-g.elf /mnt/c/Local/ - -obj/%.o: src/%.S - ${AS} ${AFLAGS} -g -c $< -o $@ - -run: build/kernel.elf - ${QEMU} -kernel $< ${QFLAGS} - -run-debug: build/kernel-g.elf - ${QEMU} -kernel $< -s -S ${QFLAGS} - -debug: build/kernel-g.elf build/kernel.list - ${GDB} $< -command=gdbinit - -clean: - rm -f obj/*.o build/*.elf build/*.list build/*.img +Unix.mk
\ No newline at end of file |