aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 82169a0cb143e905fccdee871ac15a9f787737cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CC = gcc
ACC = arm-linux-gnueabihf-gcc
DATE = $(shell date "+%Y-%m-%d %H:%M:%S" )
VFLAGS = -D"_BUILD_TIME_=\"$(DATE)\""
CFLAGS = -Wall 
#-D"WITH_I2C_SMBUS"

all: dir smbus 
##copy

dir:
	mkdir -p build/

armhf: 
		$(ACC) $(CFLAGS) $(VFLAGS) src/hmc5883.c src/hih61xx.c src/lm75.c src/main.c -o build/i2sensors-armhf -li2c

tiny: 
		$(CC) $(CFLAGS) $(VFLAGS) src/hmc5883.c src/hih61xx.c src/lm75.c src/main.c -o build/i2sensors 

geode: 
		$(CC) $(CFLAGS) $(VFLAGS) -m32 -march=geode src/hmc5883.c src/hih61xx.c src/lm75.c src/main.c -o build/i2sensors -li2c

smbus:
		$(CC) $(CFLAGS) $(VFLAGS) -D"WITH_I2C_SMBUS" src/hmc5883.c src/hih61xx.c src/lm75.c src/main.c -o build/i2sensors -li2c

copy:
	scp -r build/i2sensors-armhf root@cb2:/tmp/i2sensors
#	rsync -aHv -q -e "ssh"  build/i2sensors-arm root@cb2:/tmp/i2sensors
        
clean:
	rm -f build/*