-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
23 lines (17 loc) · 858 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CC := gcc
CFLAGS := -O2 -Wall -Werror -Wno-error=unused-result -pedantic -std=gnu99
INSTALL := install -Dm755
.PHONY: clean install
hummingbird: src/signal.c src/shutdown.c src/init.c src/hummingbird.c
$(CC) $(CFLAGS) src/signal.c src/shutdown.c src/init.c src/hummingbird.c -o hummingbird
install: hummingbird
mkdir -p "$(DESTDIR)/usr/lib/hummingbird"
dd count=1 bs=512 if=/dev/urandom of="$(DESTDIR)/usr/lib/hummingbird/random.seed"
$(INSTALL) hummingbird "$(DESTDIR)/usr/bin/hummingbird"
$(INSTALL) bin/shutdown "$(DESTDIR)/usr/bin/shutdown"
$(INSTALL) bin/reboot "$(DESTDIR)/usr/bin/reboot"
$(INSTALL) usr/lib/hummingbird/fs "$(DESTDIR)/usr/lib/hummingbird/fs"
$(INSTALL) usr/lib/hummingbird/tty "$(DESTDIR)/usr/lib/hummingbird/tty"
$(INSTALL) usr/lib/hummingbird/shutdown "$(DESTDIR)/usr/lib/hummingbird/shutdown"
clean:
rm hummingbird