Newer
Older
pyenergenie / src / energenie / build
@David Whale David Whale on 3 Apr 2016 789 bytes Started to refactor code into C
#! /bin/bash


# build gpio_test
gcc gpio_test.c gpio.c
mv a.out gpio_test
chmod u+x gpio_test


# build spis_test (soft SPI tester)
gcc spi_test.c spis.c gpio.c
mv a.out spis_test
chmod u+x spis_test

# build spih_test (hard SPI tester)
gcc spi_test.c spih.c gpio.c
mv a.out spih_test
chmod u+x spish_test


# build hrf69_test
## gcc hrf69_test.c hrf69.c spis.c gpio.c
## mv a.out hrf69_test
## chmod u+x hrf69_test


# build radio_test
## gcc radio_test.c radio.c hrf69.c spis.c gpio.c
## mv a.out radio_test
## chmod u+x radio_test


# build spi .so library on Raspberry Pi
gcc -Wall -shared -o spi_rpi.so -fPIC spis.c gpio.c
# nm -D spi_rpi.so

# radio spi .so library on Raspberry Pi
## gcc -Wall -shared -o radio_rpi.so -fPIC radio.c hrf69.c spis.c gpio.c
## nm -D spi_rpi.so

# END