2022-09-05 04:48:38 +03:00
|
|
|
CC ?= cc
|
2023-02-13 01:29:02 +03:00
|
|
|
STRIP ?= strip
|
2022-09-05 04:48:38 +03:00
|
|
|
INSTALL ?= ./install-sh
|
|
|
|
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
|
2023-04-14 14:43:16 +03:00
|
|
|
CFLAGS ?= -g -O2 -pipe
|
2022-09-05 04:48:38 +03:00
|
|
|
|
|
|
|
.PHONY: all
|
2023-02-07 03:04:05 +03:00
|
|
|
all: limine-deploy limine-version limine-enroll-config
|
2022-09-05 04:48:38 +03:00
|
|
|
|
2023-02-13 01:29:02 +03:00
|
|
|
.PHONY: install
|
|
|
|
install: all
|
2022-09-05 04:48:38 +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-cd-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/'
|
2023-06-15 14:22:20 +03:00
|
|
|
$(INSTALL) -m 644 BOOTAA64.EFI '$(DESTDIR)$(PREFIX)/share/limine/'
|
2022-09-05 04:48:38 +03:00
|
|
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/include'
|
|
|
|
$(INSTALL) -m 644 limine.h '$(DESTDIR)$(PREFIX)/include/'
|
|
|
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
|
|
|
|
$(INSTALL) limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
|
|
|
|
$(INSTALL) limine-version '$(DESTDIR)$(PREFIX)/bin/'
|
2023-02-07 03:04:05 +03:00
|
|
|
$(INSTALL) limine-enroll-config '$(DESTDIR)$(PREFIX)/bin/'
|
2022-09-05 04:48:38 +03:00
|
|
|
|
|
|
|
.PHONY: install-strip
|
2023-02-13 01:29:02 +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-09-05 04:48:38 +03:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f limine-deploy limine-deploy.exe
|
|
|
|
rm -f limine-version limine-version.exe
|
2023-02-07 03:04:05 +03:00
|
|
|
rm -f limine-enroll-config limine-enroll-config.exe
|
2022-09-05 04:48:38 +03:00
|
|
|
|
2022-09-24 05:37:43 +03:00
|
|
|
limine-deploy: limine-deploy.c limine-hdd.h
|
2023-04-14 14:43:16 +03:00
|
|
|
$(CC) $(CFLAGS) -Wall -Wextra $(WERROR_FLAG) $(CPPFLAGS) $(LDFLAGS) -std=c99 limine-deploy.c $(LIBS) -o $@
|
2022-09-05 04:48:38 +03:00
|
|
|
|
|
|
|
limine-version: limine-version.c
|
2023-04-14 14:43:16 +03:00
|
|
|
$(CC) $(CFLAGS) -Wall -Wextra $(WERROR_FLAG) $(CPPFLAGS) $(LDFLAGS) -std=c99 limine-version.c $(LIBS) -o $@
|
2023-02-07 03:04:05 +03:00
|
|
|
|
|
|
|
limine-enroll-config: limine-enroll-config.c
|
2023-04-14 14:43:16 +03:00
|
|
|
$(CC) $(CFLAGS) -Wall -Wextra $(WERROR_FLAG) $(CPPFLAGS) $(LDFLAGS) -std=c99 limine-enroll-config.c $(LIBS) -o $@
|