X-Git-Url: https://git.saurik.com/apple/boot.git/blobdiff_plain/14c7c974991c850bfa0348affbd4bee3223205ee..HEAD:/i386/boot2/Makefile diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index f794d90..48d3c67 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -5,9 +5,11 @@ DIR = boot2 include ../MakePaths.dir -OPTIM = -Os -CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Wno-precomp \ - -munaligned-text -DSAIO_INTERNAL_USER -static -traditional-cpp +OPTIM = -Os -Oz +CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ + -fno-builtin -DSAIO_INTERNAL_USER -static \ + -fomit-frame-pointer -mpreferred-stack-boundary=2 \ + -fno-align-functions -mno-sse2 -mfpmath=387 DEFINES= CONFIG = hd SYMDIR = $(SYMROOT) @@ -21,9 +23,10 @@ else MKDIRS = /bin/mkdir -p endif AS = as -LD = ld +LD = gcc # LIBS= -lc_static -LIBS= -L$(SYMDIR) -lsaio -lsa -lrcz +LIBS= -L$(SYMDIR) -lsaio -lsa +LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a OTHER_FILES = @@ -32,25 +35,26 @@ VPATH = $(OBJROOT):$(SYMROOT) # The ordering is important; # boot2.o must be first. -OBJS = boot2.o boot.o graphics.o prompt.o +OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o lzss.o # button.o browser.o scrollbar.o == NOTYET UTILDIR = ../util SFILES = boot2.s -CFILES = boot.c graphics.c prompt.c -HFILES = boot.h +CFILES = boot.c graphics.c drivers.c prompt.c options.c +HFILES = boot.h appleClut8.h appleboot.h OTHERFILES = Makefile ALLSRC = $(FOREIGNSRC) $(FOREIGNBIN) $(SFILES) $(CFILES) \ $(HFILES) $(OTHERFILES) DIRS_NEEDED = $(OBJROOT) $(SYMROOT) -BOOT2ADDR = 3000 -MAXBOOTSIZE = 45056 +BOOT2ADDR = 20200 +MAXBOOTSIZE = 65024 all: $(DIRS_NEEDED) boot -boot: machOconv $(OBJS) - $(LD) -static -preload -segaddr __TEXT $(BOOT2ADDR) -segalign 20 \ - -o $(SYMROOT)/boot.sys $(OBJS) $(LIBS) -lcc_kext +boot: machOconv $(OBJS) $(LIBDEP) + $(LD) -static -Wl,-preload -Wl,-segaddr,__TEXT,$(BOOT2ADDR) \ + -nostdlib -arch i386 -Wl,-segalign,20 \ + -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot size $(SYMROOT)/boot.sys ls -l $(SYMROOT)/boot @@ -72,7 +76,7 @@ install_i386:: all $(INSTALLDIR) cd $(INSTALLDIR); chmod u+w boot $(OTHER_FILES) clean:: - rm -f $(SYMROOT)/boot.sys $(SYMROOT)/boot + rm -f $(SYMROOT)/boot.sys $(SYMROOT)/boot $(SYMROOT)/vers.h include ../MakeInc.dir