Danger-alarm/SERVER/hc-12/Makefile

22 lines
450 B
Makefile
Raw Permalink Normal View History

2024-06-03 16:27:41 +08:00
CROSS_COMPILE ?=
CC = $(CROSS_COMPILE)gcc
STRIP := $(CROSS_COMPILE)strip
AR := $(CROSS_COMPILE)ar
CFLAGS += -g -Wall -Os
LDFLAGS += -lwiringPi
MYSQL_LIB := $(shell mysql_config --libs)
MYSQL_CFLAGS := $(shell mysql_config --cflags)
OBJ = hc-12
all: hc-12
hc-12: hc-12.o ../libconf/libconf.o mysql.o
$(CC) $(CFLAGS) $(MYSQL_CFLAGS) -o $(OBJ) $^ $(MYSQL_LIB) $(LDFLAGS)
.c.o:
$(CC) $(CFLAGS) $(MYSQL_CFLAGS) -c $< $@
clean:
2024-06-06 10:05:52 +08:00
rm hc-12 *.o
2024-06-03 16:27:41 +08:00