mqttClient/Makefile
2023-03-05 17:32:32 +01:00

22 lines
535 B
Makefile

SRC := src/main.c src/mqtt.c src/module.c src/modules/*.c
INC := -I src -I include/paho-mqtt
LIBS := -Llibs/paho-mqtt -lpthread -lpaho-mqtt3a -lpaho-mqtt3c -lpthread
all: build
build: $(SRC)
gcc $(SRC) $(LIBS) -o mqttClient $(INC)
debug: $(SRC)
gcc $(SRC) $(LIBS) -g -o mqttClient $(INC)
install:
mkdir -p $$HOME/.local/bin
cp mqttClient $$HOME/.local/bin/mqttClient
chmod +x $$HOME/.local/bin/mqttClient
# sed -e "s/<username>/$$(id -un)/g" mqttClient.service >/etc/systemd/system/mqttClient.service
clean:
rm mqttClient