1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
# Uncomment the following if you are a distribution maker and want to
# install to somewhere else than /
#DESTDIR=/tmp/fefix
all: fgetty login login2 checkpassword
DIET=diet -Os
#CROSS=arm-linux-
CROSS=
%.o: %.c
# gcc -march=i386 -mcpu=i386 -pipe -Os -fomit-frame-pointer -I../dietlibc/include -c $^ -DTEST
$(CROSS)$(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -DTEST
# gcc -march=i386 -mcpu=i386 -pipe -g -I../dietlibc/include -DTEST -c $^
%: %.o
$(CROSS)$(CC) -o $@ $^ $(LDFLAGS)
fgetty: fgetty.o fmt_ulong.o
login: login.o
login2: login2.o
checkpassword: checkpassword.o
checkpassword-pam: checkpassword-pam.o checkpassword-pam2.o
$(CROSS)$(CC) -o $@ $^ -lmisc $(LDFLAGS)
debug: fgetty.c fmt_ulong.o
gcc -g -o debug fgetty.c fmt_ulong.o -DDEBUG
install:
install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin $(DESTDIR)/usr/share/man/man8 $(DESTDIR)/usr/libexec/fgetty
install login $(DESTDIR)/usr/libexec/fgetty/login1
install login2 $(DESTDIR)/usr/libexec/fgetty/login2
install fgetty $(DESTDIR)/usr/sbin
install checkpassword $(DESTDIR)/usr/bin/checkpassword.login
install -m 644 fgetty.8 $(DESTDIR)/usr/share/man/man8/fgetty.8
@echo "now change your /etc/inittab to do something like"
@echo " 1:123:respawn:/usr/sbin/fgetty /dev/vc/1 --noclear"
clean:
rm -f *.o fgetty debug dietgetty login login2 checkpassword core
sigs: fgetty.sig login.sig login2.sig checkpassword.sig
.SUFFIXES: .sig
%.sig: %
gpg --detach-sign $<
VERSION=fgetty-$(shell head -n 1 CHANGES|sed 's/://')
CURNAME=$(notdir $(shell pwd))
tar: clean rename
cd ..; tar cvvf $(VERSION).tar.bz2 $(VERSION) --use=bzip2 --exclude CVS
rename:
if test $(CURNAME) != $(VERSION); then cd .. && mv $(CURNAME) $(VERSION); fi
|