NAME=jaxstream
VERSION=1.0.0
PKG=$(NAME)-$(VERSION)

CC=gcc
CFLAGS=-DVERSION=\"$(VERSION)\"

CFLAGS+=-O3 -Wall
LDFLAGS+=-O3

#CFLAGS+=-ggdb -Wall
#LDFLAGS+=-ggdb

INSTALLDIR=/usr/local/bin

all: jaxstream

jaxstream: jaxstream.o

jaxstream.o: jaxstream.c jaxstream.h

clean:
	rm -f jaxstream *.o

new: clean all

tgz: 
	rm -rf $(PKG)
	mkdir $(PKG)
	cp *.c *.h Makefile *.cfg $(PKG)
	tar -zcvf $(PKG).tar.gz $(PKG)
	make -C $(PKG)
	rm -rf $(PKG)

install:
	cp jaxstream.cfg /etc/jaxstream.cfg.new
	install jaxstream $(INSTALLDIR)
	@echo
	@echo "*** Now move /etc/jaxstream.cfg.new to /etc/jaxstream.cfg and edit it"
	@echo "**** or else integrate anything in it into your current file."
	@echo
