rulimine/host/Makefile

46 lines
1.5 KiB
Makefile
Raw Normal View History

2022-01-02 14:45:15 +03:00
CC ?= cc
2022-01-22 05:46:48 +03:00
INSTALL ?= ./install-sh
2022-01-02 14:45:15 +03:00
PREFIX ?= /usr/local
2022-01-28 12:23:26 +03:00
CFLAGS ?= -g -O2 -pipe -Wall -Wextra
2022-01-02 14:45:15 +03:00
.PHONY: all
all: limine-deploy limine-version
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-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/'
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
.PHONY: install
install: install-data
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
2022-04-02 10:31:19 +03:00
$(INSTALL) limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
$(INSTALL) limine-version '$(DESTDIR)$(PREFIX)/bin/'
2022-01-27 14:53:40 +03:00
.PHONY: install-strip
install-strip: install-data
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/bin'
2022-04-02 10:31:19 +03:00
$(INSTALL) -s limine-deploy '$(DESTDIR)$(PREFIX)/bin/'
$(INSTALL) -s limine-version '$(DESTDIR)$(PREFIX)/bin/'
2022-01-27 14:53:40 +03:00
2022-01-02 14:45:15 +03:00
.PHONY: clean
clean:
2022-04-02 10:31:19 +03:00
rm -f limine-deploy limine-deploy.exe
rm -f limine-version limine-version.exe
limine-deploy: limine-deploy.c limine-hdd.h
2022-09-21 00:10:19 +03:00
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -std=c99 -D__USE_MINGW_ANSI_STDIO limine-deploy.c $(LIBS) -o $@
limine-version: limine-version.c
2022-09-21 00:10:19 +03:00
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -std=c99 -D__USE_MINGW_ANSI_STDIO limine-version.c $(LIBS) -o $@