#-------------------------------------------------------------------
#
#  Makefile dla programu "etad"
#
#-------------------------------------------------------------------

BINDIR=/usr/sbin
# gdzie ulokowa dokumentacje w html
DOCDIR=/usr/local/src/eta

CC=gcc
LD=gcc
#CFLAGS=-g -Wall -DDEBUG
CFLAGS=-Wall -O2
LDFLAGS=

OBJS=etad.o


all: makeall

ifeq (.depend,$(wildcard .depend))
include .depend
makeall: etad
else
makeall: depend etad
endif

depend dep: 
	$(CC) -M *.c > .depend;

clean:
	rm -f $(OBJS)
	rm -f .depend

realclean: clean
	rm -f etad


install: makeall
	cp etad $(BINDIR)
	chmod 755 $(BINDIR)/etad
	mkdir -p $(DOCDIR)
	cp manual.html $(DOCDIR)
	cp README $(DOCDIR)
	cp COPYING $(DOCDIR)

etad : $(OBJS)
	$(LD) $(LDFLAGS) $(OBJS) -o $@

.c.o:
	$(CC) $(DEBUG) $(CFLAGS) -c $< -o $@




