Skip to content

Commit 0401d11

Browse files
committed
* Updated Makefile
1 parent 74fabe4 commit 0401d11

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

Makefile

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
CPP=gcc
2+
AS=as
3+
LD=ld
24
CPPFLAGS = -m32 -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings
35
ASFLAGS = --32
46
LDFLAGS = -melf_i386
@@ -37,11 +39,11 @@ prep:
3739

3840
%.o: %.s
3941
@printf "\e[1;32m[1/3]Compiling $<\n\e[0m"
40-
as $(ASFLAGS) -o $@ $<
42+
$(AS) $(ASFLAGS) -o $@ $<
4143

4244
SectorOS_Kernel.bin: LILO/linker.ld $(objects)
4345
@printf "\e[1;33m[2/3]Linking object files\n\e[0m"
44-
@ld $(LDFLAGS) -T $< -o $@ $(objects)
46+
@$(ld) $(LDFLAGS) -T $< -o $@ $(objects)
4547
@printf "Linking $(objects) to make $@\n"
4648
@printf "Linking finished\n"
4749

@@ -93,20 +95,4 @@ stopVBOX:
9395
.PHONY: clean
9496
clean:
9597
@printf "\e[1;31mCleaning the object files...\n\e[0m"
96-
@rm -f $(objects) SectorOS_Kernel.bin SectorOS.iso
97-
98-
.PHONY: Install-Grub-BIOS
99-
Install-Grub-BIOS:
100-
git clone https://git.savannah.gnu.org/git/grub.git
101-
sudo sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list
102-
sudo apt update
103-
sudo apt-get install build-essential autoconf automake autopoint
104-
sudo apt-get build-dep grub-pc
105-
ls
106-
cd grub && \
107-
./bootstrap && \
108-
./autogen.sh && \
109-
./configure --prefix=$HOME/local --platform=pc && \
110-
make && \
111-
sudo make install && \
112-
@echo Installed Grub-BIOS
98+
@rm -f $(objects) SectorOS_Kernel.bin SectorOS.iso

0 commit comments

Comments
 (0)