# $Id: Makefile,v 1.4 1999/05/23 22:58:55 tp Exp $

RELEASE=2.11

CC = gcc

# update doesn't need to run as root, at least if capabilities are used.
# When building for systems where this is true, -DRESTRICT_TO_ROOT=0
# should be added to CFLAGS.
CFLAGS = -O3 -fomit-frame-pointer -Wall

BINDIR = /sbin
MANDIR = /usr/man/man8

update: update.o

install: update
	mkdir -p $(BINDIR)
	mkdir -p $(MANDIR)
	install -c -s update $(BINDIR)/update
	install update.8 $(MANDIR)

clean:
	rm -f update core *.o *~

dist:
	(mkdir -p updated-$(RELEASE)/debian;\
	cp update.spec Makefile update.lsm\
	   update.c update.8 COPYING updated-$(RELEASE);\
	cp debian/README debian/changelog debian/control\
	   debian/copyright debian/rules updated-$(RELEASE)/debian;\
	chmod -R u=rwX,go=rX updated-$(RELEASE);\
	tar zcvf updated-$(RELEASE).tar.gz updated-$(RELEASE);\
	rm -fr updated-$(RELEASE))

# depencies
update.o: update.c
