2022-01-02 15:21:04 +03:00
|
|
|
CC ?= cc
|
2021-04-09 04:24:34 +03:00
|
|
|
|
2022-01-02 15:21:04 +03:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
DESTDIR ?=
|
2021-03-18 10:01:23 +03:00
|
|
|
|
2022-01-02 15:21:04 +03:00
|
|
|
CFLAGS ?= -O2 -pipe -Wall -Wextra
|
2021-03-18 10:01:23 +03:00
|
|
|
|
2022-01-02 15:21:04 +03:00
|
|
|
.PHONY: all
|
2021-11-30 03:12:04 +03:00
|
|
|
all: limine-install
|
2021-03-18 10:01:23 +03:00
|
|
|
|
2022-01-02 15:21:04 +03:00
|
|
|
.PHONY: install
|
2021-03-18 10:01:23 +03:00
|
|
|
install: all
|
2021-11-30 03:12:04 +03:00
|
|
|
install -d '$(DESTDIR)$(PREFIX)/bin'
|
|
|
|
install -s limine-install '$(DESTDIR)$(PREFIX)/bin/'
|
|
|
|
install -d '$(DESTDIR)$(PREFIX)/share'
|
|
|
|
install -d '$(DESTDIR)$(PREFIX)/share/limine'
|
|
|
|
install -m 644 limine.sys '$(DESTDIR)$(PREFIX)/share/limine/'
|
|
|
|
install -m 644 limine-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
|
|
|
install -m 644 limine-eltorito-efi.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
|
|
|
install -m 644 limine-pxe.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
|
|
|
install -m 644 BOOTX64.EFI '$(DESTDIR)$(PREFIX)/share/limine/'
|
|
|
|
install -m 644 BOOTIA32.EFI '$(DESTDIR)$(PREFIX)/share/limine/'
|
2021-03-18 10:01:23 +03:00
|
|
|
|
2022-01-02 15:21:04 +03:00
|
|
|
.PHONY: clean
|
2021-03-18 10:01:23 +03:00
|
|
|
clean:
|
2021-11-30 03:12:04 +03:00
|
|
|
rm -f limine-install limine-install.exe
|
2021-11-26 17:09:17 +03:00
|
|
|
|
2021-11-30 03:12:04 +03:00
|
|
|
limine-install: limine-install.c inc.S limine-hdd.bin
|
|
|
|
$(CC) $(CFLAGS) -std=c11 limine-install.c inc.S -o $@
|