isdn4k-utils/imontty/Makefile

70 lines
1.3 KiB
Makefile
Raw Normal View History

1997-03-03 04:10:10 +00:00
# tty line ISDN status monitor
#
# (c) 1995-97 Volker G<>tz
#
# $Id: Makefile,v 1.9 2008/08/31 10:49:38 keil Exp $
1997-03-03 04:10:10 +00:00
ifeq (../scripts/autoconf.mk,$(wildcard ../scripts/autoconf.mk))
1997-03-03 04:10:10 +00:00
#
# Automatic config with isdn4k-utils
#
include ../scripts/autoconf.mk
1998-12-28 16:36:03 +00:00
MAN8DIR := $(CONFIG_MANDIR)/man8
1997-03-03 04:10:10 +00:00
else
#
# Manual config standalone
#
CONFIG_SBINDRIR := /sbin
1998-12-28 16:36:03 +00:00
MAN8DIR := /usr/man/man8
1997-03-03 04:10:10 +00:00
endif
1998-12-28 16:36:03 +00:00
INSTALL=install
INSTALL_MAN=$(INSTALL) -o 0 -g 0 -m 0644
PROGS=imontty
MANPAGES=imontty.8
1998-12-28 16:36:03 +00:00
CCFLAGS=-O2
1997-03-03 04:10:10 +00:00
#CCFLAGS=-I$(ISDN_INCLUDE) -g
# nothing to change behind this line
all: $(PROGS) $(MANPAGES)
1997-03-03 04:10:10 +00:00
imontty: imontty.c imontty.h
cc $(CFLAGS) $(CCFLAGS) -o imontty imontty.c
1997-03-03 04:10:10 +00:00
rootperm:
@echo 'main(int argc,char**argv){unlink(argv[0]);return(getuid()==0);}'>g
@if gcc -x c -o G g && rm -f g && ./G ; then \
1997-03-03 04:10:10 +00:00
echo -e "\n\n Need root permission for (de)installation!\n\n"; \
exit 1; \
fi
1998-12-28 16:36:03 +00:00
imontty.8: imontty.8.in
sed \
-e "s#\@I4LVERSION\@#$${I4LVERSION}#g" \
1998-12-28 16:36:03 +00:00
< $< > $@
install-man: $(MANPAGES)
1998-12-28 16:36:03 +00:00
mkdir -p $(DESTDIR)$(MAN8DIR)
$(INSTALL_MAN) $< $(DESTDIR)$(MAN8DIR)/$(MANPAGE)
install: $(PROGS) install-man
install -m 0755 $(PROGS) $(DESTDIR)$(CONFIG_SBINDIR)
1997-03-03 04:10:10 +00:00
uninstall:
for i in $(PROGS) ; do rm -f $(DESTDIR)$(CONFIG_SBINDIR)/$$i; done
1997-03-03 04:10:10 +00:00
clean:
rm -f *.o $(PROGS) *~
distclean: clean
1998-12-28 16:36:03 +00:00
rm -f $(MANPAGE)
1997-03-03 04:10:10 +00:00
#
# dummy for isdn4k-utils package
#
config: