mirror of
https://github.com/jlengrand/cellar-driver.git
synced 2026-03-10 08:01:19 +00:00
Create second Makefile
This commit is contained in:
28
.github/workflows/make.yml
vendored
Normal file
28
.github/workflows/make.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
name: Just run makefile
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: install deps
|
||||
run : sudo apt-get install build-essential gawk gcc g++ gfortran git texinfo bison libncurses-dev
|
||||
- name: setup toolchain
|
||||
run: wget https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%208.3.0/Raspberry%20Pi%202%2C%203/cross-gcc-8.3.0-pi_2-3.tar.gz/download
|
||||
- run: tar xf download
|
||||
- run: export PATH=$(pwd)/cross-pi-gcc-8.3.0-1/bin:$PATH; export LD_LIBRARY_PATH=$(pwd)/cross-pi-gcc-8.3.0-1/lib:$LD_LIBRARY_PATH
|
||||
- name: tools versions
|
||||
run: gcc -v; echo $PATH; echo $LD_LIBRARY; ls cross-pi-gcc-8.3.0-1
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Make
|
||||
run: cd src/main/c; make
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -57,4 +57,5 @@ local.properties
|
||||
target
|
||||
*.o
|
||||
test
|
||||
download
|
||||
download
|
||||
xcompile/
|
||||
@@ -10,7 +10,6 @@ program: Dht11Driver.c
|
||||
gcc -Wall $(INCLUDES) $(HEADERS) $(FILES) -o $(OUT)
|
||||
|
||||
library:
|
||||
|
||||
gcc -shared -fPIC -o $(OUT).so $(INCLUDES) $(FILES)
|
||||
|
||||
copy:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm testAdafruit;
|
||||
gcc -Wall -I. -Iadafruit/Raspberry_Pi_2 adafruit/common_dht_read.c adafruit/Raspberry_Pi_2/pi_2_mmio.c adafruit/Raspberry_Pi_2/pi_2_dht_read.c testAdafruit.c -o testAdafruit
|
||||
gcc -Wall -I. -Iadafruit/Raspberry_Pi_2 adafruit/common_dht_read.c adafruit/Raspberry_Pi_2/pi_2_mmio.c adafruit/Raspberry_Pi_2/pi_2_dht_read.c testAdafruit.c -o testAdafruit
|
||||
|
||||
4
src/main/c/compile_arm.sh
Executable file
4
src/main/c/compile_arm.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm testAdafruit;
|
||||
arm-linux-gnueabihf-gcc -Wall -I. -Iadafruit/Raspberry_Pi_2 adafruit/common_dht_read.c adafruit/Raspberry_Pi_2/pi_2_mmio.c adafruit/Raspberry_Pi_2/pi_2_dht_read.c testAdafruit.c -o testAdafruit
|
||||
Reference in New Issue
Block a user