
# this is the place where the header files are
INC=include
# this is the folder where the sources and object files are
SRC=src
OBJ=$(SRC:.c=.o)
# the folder where we put the libraries
LIB=libs
# the folder of the examples
FDEMOS=demos
DOBJ=$(DEMOS:.c=.o)
RMDEMOS= rm -f trifoil lorenz rossler torus
# the list of targets
LIBNUMDE=libnumde.a
# remove the object files (used in clean)
RMOBJ=rm -f *.o
# remove povray and possible png files (in demos folder)
RMPOVPNG=rm -f *.pov *.png

# the default compiler 
cc=gcc

all: $(SRC) $(INC)
	cd $(SRC);$(MAKE)
	cp $(SRC)/$(LIBNUMDE) $(LIB)
	cd $(FDEMOS);$(MAKE)

PHONY: clean
clean : 
	cd $(SRC);$(RMOBJ)
	rm -f $(SRC)/$(LIBNUMDE)
	cd $(FDEMOS);$(RMOBJ)

PHONY: allclean
allclean :
	cd $(SRC);$(RMOBJ)
	rm -f $(SRC)/$(LIBNUMDE)
	rm -f $(LIB)/$(LIBNUMDE)
	cd $(FDEMOS);$(RMOBJ)$(RMDEMOS)
	cd $(FDEMOS);$(RMPOVPNG)