cpp_src += $(wildcard *.cpp) 
cpp_src += $(wildcard ./communication/i2c/*.cpp)
cpp_src += $(wildcard ./management/command/*.cpp)
cpp_src += $(wildcard ./drivers/bh1750/*.cpp)
cpp_src += $(wildcard ./drivers/pca9685/*.cpp)
cpp_src += $(wildcard ./drivers/mcp4725/*.cpp)
cpp_src += $(wildcard ./systems/systemcall/*.cpp) 
cpp_src += $(wildcard ./drivers/pca9555/*.cpp) 
cpp_src += $(wildcard ./periferals/gpio/*.cpp) 

cpp_src += $(wildcard ./algorithms/bitgestion/*.cpp)
cpp_src += $(wildcard ./drivers/pf8574/*.cpp)

cpp_obj = $(cpp_src:.cpp=.o)
c_obj = $(c_src:.c=.o)
CC = g++ 
CFLAGS = -Wall -pedantic -li2c
LDFLAGS = 
EXEC = runtest


all : $(EXEC)

$(EXEC): $(cpp_obj) $(c_obj)
	$(CC) -o $@ $^ $(LDFLAGS) 
 
clean: 
	rm -rf $(c_obj) $(cpp_obj) $(EXEC)

cleanall: 
	rm -rf $(c_obj) $(cpp_obj) $(EXEC)
