CC = gcc -O2

#if debugging
#CC += -Wall -ggdb
#if profiling
#CC += -pg

VERSION = "0.70"

DEFS = -DVERSION=\"$(VERSION)\"

PROG = detect-scan

detect-scan: detect.c Makefile
	$(CC) $(DEFS) detect.c -o $(PROG)

force: touch_source $(PROG)

touch:
	touch detect.c

kill:
	killall -9 $(PROG)

dist: clean
	for file in *;\
	do case "$$file" in\
	RCS) ;;\
	*) tar rvf detect-scans-$(VERSION).tar $$file ;;\
	esac;\
	done
	bzip2 -9 *.tar

debug: detect.c
	$(CC) $(DEFS) -DDEBUG detect.c -o $(PROG)

install: detect-scan
	install -o root -m 0755 $(PROG) /sbin/$(PROG)

clean:
	rm -f $(PROG) detect.debug *.tar.bz2

