diff options
| -rw-r--r-- | Makefile | 35 | ||||
| -rw-r--r-- | x86/gdbstub_int.nasm (renamed from gdbstub_int.nasm) | 0 | ||||
| -rw-r--r-- | x86/gdbstub_sys.c (renamed from gdbstub_sys.c) | 0 | ||||
| -rw-r--r-- | x86/gdbstub_sys.h (renamed from gdbstub_sys.h) | 0 |
4 files changed, 22 insertions, 13 deletions
@@ -20,19 +20,28 @@ # SOFTWARE. # -CC := gcc -CFLAGS := -Werror -ansi -Os -m32 -g -ffunction-sections -fno-stack-protector -LD := ld -LDFLAGS := --script=gdbstub.ld -m elf_i386 --gc-sections -NASM := nasm -NASM_FLAGS := -felf -OBJCOPY := objcopy -OBJCOPYFLAGS := --output-target=binary -TARGET := gdbstub.bin -BASE_ADDRESS := 0x500000 -OBJECTS := gdbstub_rsp.o \ - gdbstub_int.o \ - gdbstub_sys.o +ARCH := x86 + +CC = gcc +CFLAGS = -Werror -ansi -Os -g -ffunction-sections -fno-stack-protector -I$(ARCH) -I$(PWD) +LD = ld +LDFLAGS = --script=gdbstub.ld --gc-sections +NASM = nasm +NASM_FLAGS = -felf +OBJCOPY = objcopy +OBJCOPYFLAGS = --output-target=binary +TARGET = gdbstub.bin +BASE_ADDRESS = 0x500000 +OBJECTS = gdbstub_rsp.o \ + $(ARCH)/gdbstub_sys.o + +ifeq ($(ARCH),x86) +CFLAGS += -m32 +LDFLAGS += -m elf_i386 +OBJECTS += $(ARCH)/gdbstub_int.o +else +$(error Please specify a supported architecture) +endif all: $(TARGET) .PRECIOUS: %.elf diff --git a/gdbstub_int.nasm b/x86/gdbstub_int.nasm index 2495971..2495971 100644 --- a/gdbstub_int.nasm +++ b/x86/gdbstub_int.nasm diff --git a/gdbstub_sys.c b/x86/gdbstub_sys.c index 8919c21..8919c21 100644 --- a/gdbstub_sys.c +++ b/x86/gdbstub_sys.c diff --git a/gdbstub_sys.h b/x86/gdbstub_sys.h index 639e8bd..639e8bd 100644 --- a/gdbstub_sys.h +++ b/x86/gdbstub_sys.h |
