Updated Makefile for more consistency

This commit is contained in:
Hunter White 2021-02-24 12:50:23 -05:00
parent 1fc49a33df
commit 0e2a460700
2 changed files with 3 additions and 1 deletions

View File

@ -67,6 +67,8 @@ CRTENDOBJ := $(shell $(C) $(CFLAGS) -print-file-name=crtend.o)
CRTBEGIN := $(GLOBALARCHDIR)/crti.o $(CRTBEGINOBJ)
CRTEND := $(CRTENDOBJ) $(GLOBALARCHDIR)/crtn.o
LINKERFILE := $(SRCDIR)/linker.lds
MAKEOBJS := $(GLOBALARCHDIR)/crti.o $(GLOBALARCHDIR)/crtn.o $(BUILDDIR)/linker.lds $(OBJECTS) $(ASOBJECTS)
#Order the objects to prevent weird gcc bugs with global constructors
@ -87,7 +89,7 @@ bin/ZoarialBareOS.bin: $(MAKEOBJS)
bin/grub.cfg: $(SRCDIR)/grub.cfg
cp $(SRCDIR)/grub.cfg bin/grub.cfg
$(BUILDDIR)/linker.lds: $(SRCDIR)/linker.lds.S
$(BUILDDIR)/linker.lds: $(LINKERFILE)
$(C) $(CFLAGS) $(INC) -E -P -o $@ -x c-header $^
#Include dependencies which are created