Files
finit/Makefile
T
Claudio Matsuoka fb8c341168 Change poweroff method to reboot(RB_POWER_OFF) (Metalshark)
Metalshark says:
February 19th, 2008 at 9:10 pm

There is an issue with some ACPI/Kernel combinations to do with shutdown.

It isn’t always powering off (tried /proc/acpi and /sys methods) - however
removing all the fd > 5 stuff and putting in the simple line
“reboot(RB_POWER_OFF);” worked for all thus far. Although semantically
incorrect it is a working solution.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2008-02-21 09:43:35 -03:00

66 lines
1.4 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
CC = gcc
CFLAGS = -Os -Wall -DVERSION=\"$(VERSION)\" -DWHOAMI=\"`whoami`@`hostname`\"
LD = gcc
LDFLAGS =
LIBS =
VERSION = 0.3-pre
PKG = finit-$(VERSION)
DFILES = Makefile README finit.c finit-mod.c finit-alt.c helpers.c helpers.h
BINS = finit finit-mod finit-mdv
#### Configurable parameters
# Add -DDEBUG to build with debug messages, also drops to terminal after X
#CFLAGS += -DDEBUG
# Parameters added by Metalshark
# Use -march=pentium-m to build for Eeepc
CFLAGS += -march=pentium-m
# Omit the first /sbin/hwclock if CONFIG_RTC_HCTOSYS is enabled in the kernel
#CFLAGS += -DNO_HCTOSYS
# Append –directisa to /sbin/hwclock lines if the user has disabled
# CONFIG_GENRTC and enabled CONFIG_RTC but not enabled CONFIG_HPET_TIMER
# and CONFIG_HPET_RTC_IRQ.
#CFLAGS += -DDIRECTISA
.c.o:
$(CC) -c $(CFLAGS) -o $*.o $<
all: $(BINS)
finit: finit.o
$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)
strip $@
finit-mod: finit-mod.o helpers.o
$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)
strip $@
finit-mdv: finit-mdv.o helpers.o
$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)
strip $@
finit-mdv.o: finit-alt.c Makefile
$(CC) -c $(CFLAGS) -DDIST_MDV -o $@ finit-alt.c
clean:
rm -f *.o core *~ $(BINS)
finit.o: finit.c Makefile
finit-mod.o: finit-mod.c Makefile
dist:
rm -Rf $(PKG)
mkdir $(PKG)
cp Makefile $(DFILES) $(PKG)
tar cf - $(PKG) | gzip -c > $(PKG).tar.gz
rm -Rf $(PKG)
ls -l $(PKG).tar.gz