Add Makefile for easy compile & run.
This commit is contained in:
parent
81230c6f6b
commit
f9da4031ca
1 changed files with 20 additions and 0 deletions
20
Makefile
Normal file
20
Makefile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
CC=clang
|
||||||
|
|
||||||
|
FRAMEWORKS:= -framework Foundation -framework IOKit
|
||||||
|
LIBRARIES:= -lobjc
|
||||||
|
|
||||||
|
SOURCE=temp_sensor.m
|
||||||
|
|
||||||
|
CFLAGS=-Wall -v $(SOURCE)
|
||||||
|
LDFLAGS=$(LIBRARIES) $(FRAMEWORKS)
|
||||||
|
OUT=-o temp_sensor
|
||||||
|
|
||||||
|
build:
|
||||||
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OUT)
|
||||||
|
|
||||||
|
all: build
|
||||||
|
|
||||||
|
run:
|
||||||
|
./temp_sensor | ./monitor.py
|
||||||
|
|
||||||
|
.phony: build run
|
Loading…
Reference in a new issue