1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/mkinitrd/Makefile

36 lines
834 B
Makefile
Raw Normal View History

2014-06-28 10:10:20 -04:00
include ../build-aux/platform.mak
include ../build-aux/compiler.mak
include ../build-aux/version.mak
include ../build-aux/dirs.mak
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
2016-02-28 17:03:16 -05:00
CFLAGS?=$(OPTLEVEL)
SORTIXKERNEL=../kernel
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\" -I$(SORTIXKERNEL)/include -I.
2016-02-28 17:03:16 -05:00
CFLAGS:=$(CFLAGS) -Wall -Wextra
ifeq ($(HOST_IS_SORTIX),0)
CPPFLAGS+=-D_GNU_SOURCE
endif
BINARIES=mkinitrd initrdfs
all: $(BINARIES)
.PHONY: all install clean
2016-02-28 17:03:16 -05:00
%: %.c crc32.c rules.c serialize.c zcrc32.c
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< crc32.c rules.c serialize.c zcrc32.c -o $@
clean:
rm -f $(BINARIES)
install: all
2015-10-07 15:24:39 -04:00
mkdir -p $(DESTDIR)$(SBINDIR)
install $(BINARIES) $(DESTDIR)$(SBINDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man8
cp initrdfs.8 $(DESTDIR)$(MANDIR)/man8/initrdfs.8
cp mkinitrd.8 $(DESTDIR)$(MANDIR)/man8/mkinitrd.8