Étape 4: compiler
modify\test\Makefile :LIBS =-L. /.. / exemple/core - larduino - lspi
INCS =-J’AI... /.. /Sample/Core/include
CIBLE =... /.. test/échantillon /
OBJS = io_test adc_test pwm_test spi_test adxl345_test MQ2
tous : $(OBJS)
$(TARGET) -p
$(OBJS) $(TARGET)
io_test : io_test.c
$(CC) $(LIBS) $(INCS) & lt ; -o $@
MQ2 : MQ2.c
$(CC) $(LIBS) $(INCS) & lt ; -o $@
adc_test : adc_test.c
$(CC) $(LIBS) $(INCS) & lt ; -o $@
pwm_test : pwm_test.c
$(CC) $(LIBS) $(INCS) & lt ; -o $@
spi_test : spi_test.c
$(CC) $(LIBS) $(INCS) & lt ; -o $@
adxl345_test : adxl345_test.c
$(CC) & lt ; -o $@
nettoyer :
J’ai en $(OBJS) ; Do rm -f $(cible) / $$ i ; fait
MQ2 : MQ2.c au milieu est le nouveau programme ajouté.
Rouvrir le terminal pour rendre le fichier de bibliothèque :
c_enviroment cd Ubuntu
Ubuntu $ make