From f9da4031cac15dda4c051e9fde58bb1320950399 Mon Sep 17 00:00:00 2001 From: Michael Madden Date: Fri, 24 Sep 2021 19:27:28 -0500 Subject: [PATCH] Add Makefile for easy compile & run. --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2e790ec --- /dev/null +++ b/Makefile @@ -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 \ No newline at end of file