mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 14:38:21 +00:00
init: poweroff program
This commit is contained in:
+12
-3
@@ -1,13 +1,22 @@
|
||||
.phony: all install
|
||||
CC=x86_64-astral-gcc
|
||||
LD=x86_64-astral-gcc
|
||||
all: init
|
||||
|
||||
all: init poweroff
|
||||
|
||||
install:
|
||||
cp init "$(DESTDIR)/init"
|
||||
mkdir -pv "$(DESTDIR)/usr/sbin"
|
||||
cp -v init "$(DESTDIR)/init"
|
||||
cp -v poweroff "$(DESTDIR)/usr/sbin/poweroff"
|
||||
|
||||
init: main.o
|
||||
$(LD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
poweroff: poweroff.o
|
||||
$(LD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
main.o: main.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
poweroff.o: poweroff.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
Reference in New Issue
Block a user