aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGergő J. Miklós2019-05-10 23:12:31 +0200
committerGergő J. Miklós2019-05-10 23:12:31 +0200
commit7dd3691d171f10a76375796936b0ad215f07efa0 (patch)
treeb762afc737670017ae9ade96c089e5b185029193
parentab99f700bace05491919324259c9110c7f387af8 (diff)
downloadi2sensors-7dd3691d171f10a76375796936b0ad215f07efa0.tar.gz
i2sensors-7dd3691d171f10a76375796936b0ad215f07efa0.zip
makefile
-rw-r--r--.gitignore1
-rw-r--r--Makefile18
-rw-r--r--Makefile.openwrt2
-rw-r--r--build.sh1
4 files changed, 21 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 6f31401..3b47b1f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
+*~
build/
.vscode/
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a1bfd3a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+CC = gcc
+ACC = arm-linux-gnueabihf-gcc
+CFLAGS = -Wall
+
+all: main copy
+
+
+main:
+ $(CC) $(CFLAGS) src/main.c src/hih61xx.c src/lm75.c -o build/i2sensors
+ $(ACC) $(CFLAGS) src/main.c src/hih61xx.c src/lm75.c -o build/i2sensors-armhf
+
+
+clean:
+ rm -f build/i2sensors*
+
+copy:
+ mkdir -p build/bin/
+ \ No newline at end of file
diff --git a/Makefile.openwrt b/Makefile.openwrt
index 1c90cfc..2c4d21b 100644
--- a/Makefile.openwrt
+++ b/Makefile.openwrt
@@ -1,6 +1,6 @@
include $(TOPDIR)/rules.mk
-PKG_NAME:=i3ensors
+PKG_NAME:=i2sensors
PKG_VERSION:=1.0
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=AA <aa@aa.hu>
diff --git a/build.sh b/build.sh
index 1e43724..34ff86c 100644
--- a/build.sh
+++ b/build.sh
@@ -3,6 +3,7 @@
#cd "i2sensors/"
gcc -Wall src/main.c src/hih61xx.c src/lm75.c -o build/i2sensors
+arm-linux-gnueabihf-gcc -Wall src/main.c src/hih61xx.c src/lm75.c -o build/i2sensors-arm
build/i2sensors