Skip to content

Commit

Permalink
misc: Makefile adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Feb 22, 2021
1 parent 6739ff8 commit 81f3941
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DESTDIR =

PATH := $(shell pwd)/toolchain/bin:$(PATH)

.PHONY: all clean install bootloader bootloader-clean distclean stage2 stage2-clean decompressor decompressor-clean toolchain test.hdd echfs-test ext2-test fat32-test
.PHONY: all clean install tinf-clean bootloader bootloader-clean distclean stage2 stage2-clean decompressor decompressor-clean toolchain test.hdd echfs-test ext2-test fat32-test

all: limine-install

Expand All @@ -26,7 +26,7 @@ install: all
install -d $(DESTDIR)$(PREFIX)/bin
install -s limine-install $(DESTDIR)$(PREFIX)/bin/

bootloader: | decompressor decompressor-clean stage2
bootloader: | decompressor stage2
gzip -n -9 < stage2/stage2.bin > stage2/stage2.bin.gz
cd bootsect && nasm bootsect.asm -fbin -o ../limine.bin
cd pxeboot && nasm bootsect.asm -fbin -o ../limine-pxe.bin
Expand All @@ -39,17 +39,20 @@ bootloader-clean: stage2-clean decompressor-clean test-clean
distclean: clean bootloader-clean
rm -rf stivale

tinf-clean:
cd tinf && rm -rf *.o *.d

stivale:
git clone https://github.com/stivale/stivale.git
cd stivale && git checkout d0a7ca5642d89654f8d688c2481c2771a8653c99

stage2: stivale
stage2: tinf-clean stivale
$(MAKE) -C stage2 all

stage2-clean:
$(MAKE) -C stage2 clean

decompressor:
decompressor: tinf-clean
$(MAKE) -C decompressor all

decompressor-clean:
Expand Down
4 changes: 2 additions & 2 deletions decompressor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ INTERNAL_LDFLAGS = \

.PHONY: all clean

C_FILES := $(shell find ./ -type f -name '*.c' | sort)
ASM_FILES := $(shell find ./ -type f -name '*.asm' | sort)
C_FILES := $(shell find -L ./ -type f -name '*.c' | sort)
ASM_FILES := $(shell find -L ./ -type f -name '*.asm' | sort)
OBJ := $(ASM_FILES:.asm=.o) $(C_FILES:.c=.o)
HEADER_DEPS := $(C_FILES:.c=.d)

Expand Down
2 changes: 1 addition & 1 deletion decompressor/main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdint.h>
#include <stddef.h>
#include <gzip/tinf.h>
#include <tinf/tinf.h>

__attribute__((noreturn))
void entry(uint8_t *compressed_stage2, size_t stage2_size, uint8_t boot_drive, int pxe) {
Expand Down
1 change: 1 addition & 0 deletions decompressor/tinf
2 changes: 1 addition & 1 deletion stage2/tinf
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 81f3941

Please sign in to comment.