Skip to content

Instantly share code, notes, and snippets.

@jlengrand
Created July 29, 2020 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlengrand/eb62c5eff279b9d5ffcb9047aa3a0e0d to your computer and use it in GitHub Desktop.
Save jlengrand/eb62c5eff279b9d5ffcb9047aa3a0e0d to your computer and use it in GitHub Desktop.
INCLUDES = -I. -I../java -Iadafruit/Raspberry_Pi_2 -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(JAVA_HOME)/include/darwin
HEADERS = ../../../target/headers/nl_lengrand_cellar_Dht11Driver.h adafruit/common_dht_read.h adafruit/Raspberry_Pi_2/pi_2_mmio.h adafruit/Raspberry_Pi_2/pi_2_dht_read.h
FILES = adafruit/common_dht_read.c adafruit/Raspberry_Pi_2/pi_2_mmio.c adafruit/Raspberry_Pi_2/pi_2_dht_read.c Dht11Driver.c
OUT = libdht11
default: library copy
program: Dht11Driver.c
arm-linux-gnueabihf-gcc -Wall $(INCLUDES) $(HEADERS) $(FILES) -o $(OUT)
library:
gcc -shared -fPIC -o $(OUT).so $(INCLUDES) $(FILES)
copy:
-cp $(OUT).so ../resources/libs/raspberry/
clean:
-rm -f $(OUT).so
-rm -f $(OUT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment