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

echo '********************************************************************************'
# build file for Mac use

# build gpio_test
##gcc gpio_test.c gpio_sim.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_sim.c delay_posix.c
mv a.out spis_test
chmod u+x spis_test


# build hrf69_test
gcc hrfm69_test.c hrfm69.c spis.c gpio_sim.c delay_posix.c
mv a.out hrfm69_test
chmod u+x hrfm69_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 hrf69_test.c hrf69.c spis_rpi.c gpio_rpi.c
##mv a.out hrf69_test
##chmod u+x hrf69_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 Mac
gcc -Wall -shared -o radio_mac.so -fPIC radio.c hrfm69.c spis.c gpio_sim.c delay_posix.c
##nm -g radio_mac.so
##cp radio_mac.so ..

# END