2022-01-02 14:45:15 +03:00
|
|
|
CC ?= cc
|
2023-02-13 01:13:26 +03:00
|
|
|
STRIP ?= strip
|
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
|
2021-03-18 07:24:40 +03:00
|
|
|
|
2023-04-11 18:15:41 +03:00
|
|
|
CFLAGS ?= -g -O2 -pipe
|
2021-03-17 20:38:47 +03:00
|
|
|
|
2022-01-02 14:45:15 +03:00
|
|
|
.PHONY: all
|
2023-02-07 01:58:19 +03:00
|
|
|
all: limine-deploy limine-version limine-enroll-config
|
2021-03-17 20:38:47 +03:00
|
|
|
|
2023-02-13 01:13:26 +03:00
|
|
|
.PHONY: install
|
|
|
|
install: 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/'
|
2022-03-30 16:14:02 +03:00
|
|
|
$(INSTALL) -m 644 limine-cd-efi.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
2022-01-22 05:46:48 +03:00
|
|
|
$(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/'
|
2023-06-15 02:24:33 +03:00
|
|
|
$(INSTALL) -m 644 BOOTAA64.EFI '$(DESTDIR)$(PREFIX)/share/limine/'
|
2022-04-13 02:01:47 +03:00
|
|
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/include'
|
|
|
|
$(INSTALL) -m 644 limine.h '$(DESTDIR)$(PREFIX)/include/'
|
2022-01-27 14:53:40 +03:00
|
|
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
2022-04-02 10:31:19 +03:00
|
|
|
$(INSTALL) limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
|
2022-07-13 18:17:12 +03:00
|
|
|
$(INSTALL) limine-version '$(DESTDIR)$(PREFIX)/bin/'
|
2023-02-07 01:58:19 +03:00
|
|
|
$(INSTALL) limine-enroll-config '$(DESTDIR)$(PREFIX)/bin/'
|
2022-01-27 14:53:40 +03:00
|
|
|
|
|
|
|
.PHONY: install-strip
|
2023-02-13 01:13:26 +03:00
|
|
|
install-strip: install
|
|
|
|
$(STRIP) '$(DESTDIR)$(PREFIX)/bin/limine-deploy'
|
|
|
|
$(STRIP) '$(DESTDIR)$(PREFIX)/bin/limine-version'
|
|
|
|
$(STRIP) '$(DESTDIR)$(PREFIX)/bin/limine-enroll-config'
|
2022-01-27 14:53:40 +03:00
|
|
|
|
2022-01-02 14:45:15 +03:00
|
|
|
.PHONY: clean
|
2021-03-17 20:38:47 +03:00
|
|
|
clean:
|
2022-04-02 10:31:19 +03:00
|
|
|
rm -f limine-deploy limine-deploy.exe
|
2022-07-13 18:17:12 +03:00
|
|
|
rm -f limine-version limine-version.exe
|
2023-02-07 01:58:19 +03:00
|
|
|
rm -f limine-enroll-config limine-enroll-config.exe
|
2021-11-26 16:51:01 +03:00
|
|
|
|
2022-09-23 01:44:06 +03:00
|
|
|
limine-deploy: limine-deploy.c limine-hdd.h
|
2023-04-11 18:15:41 +03:00
|
|
|
$(CC) $(CFLAGS) -Wall -Wextra $(WERROR_FLAG) $(CPPFLAGS) $(LDFLAGS) -std=c99 limine-deploy.c $(LIBS) -o $@
|
2022-07-13 18:17:12 +03:00
|
|
|
|
|
|
|
limine-version: limine-version.c
|
2023-04-11 18:15:41 +03:00
|
|
|
$(CC) $(CFLAGS) -Wall -Wextra $(WERROR_FLAG) $(CPPFLAGS) $(LDFLAGS) -std=c99 limine-version.c $(LIBS) -o $@
|
2023-02-07 01:58:19 +03:00
|
|
|
|
|
|
|
limine-enroll-config: limine-enroll-config.c
|
2023-04-11 18:15:41 +03:00
|
|
|
$(CC) $(CFLAGS) -Wall -Wextra $(WERROR_FLAG) $(CPPFLAGS) $(LDFLAGS) -std=c99 limine-enroll-config.c $(LIBS) -o $@
|