#
ifndef ESP_ROOT
$(error ESP_ROOT must be set -- Please fix the environment...)
endif
ifndef ESP_ARCH
$(error ESP_ARCH must be set -- Please fix the environment...)
endif
#
IDIR  = $(ESP_ROOT)/include
include $(IDIR)/$(ESP_ARCH)
LDIR  = $(ESP_ROOT)/lib

default:	Exercise1 Exercise2

Exercise1:	Exercise1.o
	$(CXX) -o  Exercise1 Exercise1.o -L$(LDIR) -legads $(RPATH) -lm

Exercise1.o:	Exercise1.c 
	$(CC) -c $(COPTS) $(DEFINE) -I$(IDIR) Exercise1.c 

Exercise2:	Exercise2.o
	$(CXX) -o  Exercise2 Exercise2.o -L$(LDIR) -legads $(RPATH) -lm

Exercise2.o:	Exercise2.c 
	$(CC) -c $(COPTS) $(DEFINE) -I$(IDIR) Exercise2.c 

clean:
	-rm Exercise1.o Exercise2.o 

cleanall:	clean
	-rm Exercise1 Exercise2
