2022-01-02 14:45:15 +03:00
|
|
|
CC ?= cc
|
2022-01-22 05:46:48 +03:00
|
|
|
INSTALL ?= ./install-sh
|
2021-04-08 20:41:46 +03:00
|
|
|
|
2022-01-02 14:45:15 +03:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
DESTDIR ?=
|
2021-03-18 07:24:40 +03:00
|
|
|
|
2022-01-02 14:45:15 +03:00
|
|
|
CFLAGS ?= -O2 -pipe -Wall -Wextra
|
2021-03-17 20:38:47 +03:00
|
|
|
|
2022-01-02 14:45:15 +03:00
|
|
|
.PHONY: all
|
2021-11-28 21:00:49 +03:00
|
|
|
all: limine-install
|
2021-03-17 20:38:47 +03:00
|
|
|
|
2022-01-27 14:53:40 +03:00
|
|
|
.PHONY: install-data
|
|
|
|
install-data: all
|
2022-01-22 05:46:48 +03:00
|
|
|
$(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 07:24:40 +03:00
|
|
|
|
2022-01-27 14:53:40 +03:00
|
|
|
.PHONY: install
|
|
|
|
install: install-data
|
|
|
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
|
|
|
$(INSTALL) limine-install '$(DESTDIR)$(PREFIX)/bin/'
|
|
|
|
|
|
|
|
.PHONY: install-strip
|
|
|
|
install-strip: install-data
|
|
|
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
|
|
|
$(INSTALL) -s limine-install '$(DESTDIR)$(PREFIX)/bin/'
|
|
|
|
|
2022-01-02 14:45:15 +03:00
|
|
|
.PHONY: clean
|
2021-03-17 20:38:47 +03:00
|
|
|
clean:
|
2021-11-28 21:00:49 +03:00
|
|
|
rm -f limine-install limine-install.exe
|
2021-11-26 16:51:01 +03:00
|
|
|
|
2022-01-27 14:53:40 +03:00
|
|
|
limine-install: limine-install.c
|
|
|
|
$(CC) $(CFLAGS) -std=c11 limine-install.c -o $@
|