Create second Makefile

This commit is contained in:
Julien Lengrand-Lambert
2020-07-16 19:22:00 +02:00
parent c5b90cd513
commit bcc70d6b8c
5 changed files with 35 additions and 3 deletions

28
.github/workflows/make.yml vendored Normal file
View 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
View File

@@ -57,4 +57,5 @@ local.properties
target
*.o
test
download
download
xcompile/

View File

@@ -10,7 +10,6 @@ program: Dht11Driver.c
gcc -Wall $(INCLUDES) $(HEADERS) $(FILES) -o $(OUT)
library:
gcc -shared -fPIC -o $(OUT).so $(INCLUDES) $(FILES)
copy:

View File

@@ -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
View 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