VERSION=0.2

DEBUG= -g #-D_DEBUG #-fprofile-arcs -ftest-coverage # -pg -g
CFLAGS+=-O2 -DVERSION=\"${VERSION}\" $(DEBUG)
LDFLAGS+=$(DEBUG) -lm

OBJS=error.o kernel.o main.o math.o 

all: timer_entropyd

timer_entropyd: $(OBJS)
	$(CC) -Wall -W $(OBJS) $(LDFLAGS) -o timer_entropyd

install: timer_entropyd
	cp timer_entropyd /usr/local/sbin

clean:
	rm -f $(OBJS) timer_entropyd core *.da *.gcov *.bb*

package: clean
	mkdir timer_entropyd-$(VERSION)
	cp *.c* *.h Makefile Changes readme.txt license.txt timer_entropyd-$(VERSION)
	tar czf timer_entropyd-$(VERSION).tgz timer_entropyd-$(VERSION)
	rm -rf timer_entropyd-$(VERSION)
