Skip to content

Commit

Permalink
Improve Makefile, Use project name in GRUB menu entry
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpas committed Jan 17, 2018
1 parent f83e156 commit c4eea48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ BOOT = iso/boot
ELF = $(BIN)/main.elf
IMG = $(BIN)/main.img

OBJS := $(foreach IN_EXT, .c .asm, $(patsubst %$(IN_EXT), %.o, $(wildcard $(SRC)/*$(IN_EXT)))) $(SRC)/boot.o

all: $(IMG)

$(IMG): $(ELF)
@echo " GRUB $<"
@cp '$<' '$(BOOT)'
@$(GRUB) -o '$@' $(GRUBFLAGS)

$(ELF): $(OBJS)
$(ELF): \
$(patsubst %.c, %.o, $(wildcard $(SRC)/*.c)) \
$(patsubst %.asm, %.o, $(wildcard $(SRC)/*.asm))
@echo " LINK $<"
@$(LINK) -o '$(ELF)' $(LINKFLAGS) $^

Expand Down
2 changes: 1 addition & 1 deletion iso/boot/grub/grub.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set timeout=0
set default="0"
menuentry "main" {
menuentry "TyrOS" {
multiboot /boot/main.elf
}

0 comments on commit c4eea48

Please sign in to comment.