Skip to content

Commit

Permalink
Fix Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
akimach committed Oct 14, 2016
1 parent 6f423d7 commit 58d0361
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 30 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CC = gcc
LIB = lib/
SRC = src/
INCLUDE = include/

.PHONY: all
all: lsm9ds1.so

lsm9ds1.so: $(SRC)LSM9DS1.cpp
$(CC) -I./include -Wall -O2 $(SRC)LSM9DS1.cpp -lwiringPi -shared -o $(LIB)liblsm9ds1.so
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,10 @@ This library supports only I2C.

* [WiringPi](http://wiringpi.com/)

## Install & Usage

Pin assignment is below:

|RasPi|IMU|
|:-:|:-:|
|GND|GND|
|3.3VDC Power|VDD|
|Pin3|SDA|
|Pin5|SCL|
## Build

```
$ git clone https://github.com/akimach/SparkFun_LSM9DS1_Arduino_Library.git
$ git clone https://github.com/akimach/LSM9DS1_RaspberryPi_Library.git
$ cd LSM9DS1_RaspberryPi_Library
$ make
$ sudo ./LSM9DS1_Basic_I2C
```
File renamed without changes.
8 changes: 8 additions & 0 deletions example/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CC = gcc
LIB = ../lib
INCLUDE = ../include
.PHONY: all
all: LSM9DS1_Basic_I2C

LSM9DS1_Basic_I2C: LSM9DS1_Basic_I2C.cpp
$(CC) -I$(INCLUDE) -L$(LIB) -llsm9ds1 -Wall -O2 LSM9DS1_Basic_I2C.cpp -o LSM9DS1_Basic_I2C
16 changes: 16 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Build & Run

Pin assignment is below:

|RasPi|IMU|
|:-:|:-:|
|GND|GND|
|3.3VDC Power|VDD|
|Pin3|SDA|
|Pin5|SCL|

```
$ make
$ sudo -s
$ LD_LIBRARY_PATH=../lib ./LSM9DS1_Basic_I2C
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions src/Makefile

This file was deleted.

0 comments on commit 58d0361

Please sign in to comment.