CC	= gcc
CFLAGS	= -g

INCLUDE = -I. -I $(ROOT)/include -I $(HOME)/include

NEWTON  = .

all : build archive

build: Groebner.c Groebner.h
	$(CC) -c $(CFLAGS) $(INCLUDE) Groebner.c
archive:
	ar r libGroeb.a Groebner.o;\
	if [ ! -d $(ROOT)/include/groebner ]; then\
	  mkdir $(ROOT)/include/groebner;\
	fi;\
	cp *.h $(ROOT)/include/groebner;\
	cp libGroeb.a $(ROOT)/lib

clean:
	rm -f *.o *.a core
