Add Makefile for easy compile & run.

This commit is contained in:
Michael Madden 2021-09-24 19:27:28 -05:00
parent 81230c6f6b
commit f9da4031ca
1 changed files with 20 additions and 0 deletions

20
Makefile Normal file
View 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