-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile-mqtthttpd
51 lines (42 loc) · 1.13 KB
/
Makefile-mqtthttpd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
TARGET=mqtthttpd
CC = gcc
OBJDIR=obj
CFLAGS += -Wl,-Map=$(TARGET).map -Wall -g -O2 -I. -Ilibebb -DHAVE_GNUTLS -D_GNU_SOURCE
CFLAGS += -Werror
LDFLAGS = -lev -lm -Llibebb -lebb -lpthread -lssl -lmosquitto -luriparser -lgnutls #-lefence
vpath %.c common
vpath %.h common
OBJS=\
$(OBJDIR)/$(TARGET).o \
$(OBJDIR)/mqtt.o \
$(OBJDIR)/logging.o \
$(OBJDIR)/util.o \
$(OBJDIR)/jitter.o \
$(OBJDIR)/pidfile.o \
$(OBJDIR)/httpdconnlist.o \
$(OBJDIR)/b64.o \
$(OBJDIR)/tdate_parse.o \
$(OBJDIR)/httpd.o \
$(OBJDIR)/webapi.o \
$(OBJDIR)/midconnlist.o \
$(OBJDIR)/streamlist.o \
$(OBJDIR)/stream.o \
$(OBJDIR)/topic.o \
$(OBJDIR)/sublist.o \
$(OBJDIR)/cJSON.o \
$(OBJDIR)/webapi_serve.o \
$(OBJDIR)/path.o \
$(OBJDIR)/idset.o \
$(OBJDIR)/tailq.o \
$(OBJDIR)/random.o \
$(OBJDIR)/msgcache.o \
$(OBJDIR)/accesslog.o \
$(OBJDIR)/opt.o
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(TARGET)
$(OBJDIR)/%.o : %.c *.h common/*.h
@mkdir -p $(OBJDIR)
$(CC) $(CFLAGS) -o $@ -c $<
clean:
rm -rf $(OBJDIR) $(TARGET) package $(TARGET).map