Newer
Older
pyenergenie / src / energenie / drv / build_rpi
#! /bin/bash

# build file for Raspberry Pi use

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


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


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


# build hrf69_test
gcc hrfm69_test.c hrfm69.c spis.c gpio_rpi.c delay_posix.c
mv a.out hrfm69_test
chmod u+x hrfm69_test


# build radio_test
gcc radio_test.c radio.c hrfm69.c spis.c gpio_rpi.c delay_posix.c
mv a.out radio_test
chmod u+x radio_test


# radio .so library on Raspberry Pi
gcc -Wall -shared -o radio_rpi.so -fPIC radio.c hrfm69.c spis.c gpio_rpi.c delay_posix.c
##nm -D radio_rpi.so

# END