smart-green-house-server-an.../cgi-bin/Makefile

37 lines
1.2 KiB
Makefile
Raw Normal View History

cc = gcc
# CFLAGS = -Wall -g
MQTT_CFLAGS = -lmosquitto -lpthread -ldl
MQTT_CFLAGS += -I./includes
MQTT_CFLAGS += -L./mqtt_libs
SQLITE3_CFLAGS = -lpthread -ldl
SQLITE3_CFLAGS += -I./includes
CJSON_CFLAGS = -lcjson
2023-10-24 17:46:11 +08:00
all:
$(cc) sqlite3.c mqtt_sub_ctos.c -o mqtt_sub_ctos.cgi $(MQTT_CFLAGS) $(CJSON_CFLAGS) $(SQLITE3_CFLAGS)
$(cc) mqtt_pub_stoc.c -o mqtt_pub_stoc.cgi $(MQTT_CFLAGS)
$(cc) sqlite3.c sqlite_cgi_base.c -o sqlite_cgi_base.cgi $(SQLITE3_CFLAGS) $(CJSON_CFLAGS)
$(cc) sqlite3.c sqlite_cgi_insert_base.c -o sqlite_cgi_insert_base.cgi $(SQLITE3_CFLAGS) $(CJSON_CFLAGS)
2023-10-24 17:46:11 +08:00
sqlite_cgi_base:
$(cc) sqlite3.c sqlite_cgi_base.c -o sqlite_cgi_base.cgi $(SQLITE3_CFLAGS) $(CJSON_CFLAGS)
sqlite_cgi_insert_base:
$(cc) sqlite3.c sqlite_cgi_insert_base.c -o sqlite_cgi_insert_base.cgi $(SQLITE3_CFLAGS) $(CJSON_CFLAGS)
mqtt_sub_ctos:
$(cc) sqlite3.c mqtt_sub_ctos.c -o mqtt_sub_ctos.cgi $(MQTT_CFLAGS) $(CJSON_CFLAGS) $(SQLITE3_CFLAGS)
mqtt_pub_stoc:
$(cc) mqtt_pub_stoc.c -o mqtt_pub_stoc.cgi $(MQTT_CFLAGS)
mqtt:
$(cc) sqlite3.c mqtt_sub_ctos.c -o mqtt_sub_ctos.cgi $(MQTT_CFLAGS) $(CJSON_CFLAGS) $(SQLITE3_CFLAGS)
$(cc) mqtt_pub_stoc.c -o mqtt_pub_stoc.cgi $(MQTT_CFLAGS)
2023-10-24 17:46:11 +08:00
clean:
2023-10-25 14:04:49 +08:00
rm -rf *.cgi