blob: 06cf7537b54003f4d9e938e1483f8d9fb24f260b [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001SHELL = /bin/sh
2RM = rm -f
3
4LOCAL_CFLAGS := -Wall \
5 -g -Os \
6 -flto \
7 -fpermissive \
8
9
10
11
12LOCAL_PATH = .
13
14LOCAL_C_INCLUDES = \
15 -I. \
16 -I$(ROOT)$(includedir)/logger \
17 -I$(ROOT)$(includedir)/liblog \
18 -I$(ROOT)$(includedir)/glib-2.0 \
19 -I$(ROOT)$(libdir)/glib-2.0/include \
20 -I$(ROOT)$(includedir)/dbus-1.0 \
21 -I$(ROOT)$(libdir)/dbus-1.0/include \
22
23
24LOCAL_LIBS := \
25 -L. \
26 -ldl \
27 -lpthread \
28 -llynq-log \
29 -lssl \
30 -lglib-2.0 \
31 -lgobject-2.0 \
32 -lgio-2.0 \
33 -ldbus-1 \
34
35SOURCES = $(wildcard *.c)
36
37EXECUTABLE = lynq-udpser
38
39OBJECTS=$(SOURCES:.c=.o)
40all: $(EXECUTABLE)
41
42$(EXECUTABLE): $(OBJECTS)
43 $(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
44
45%.o : %.c
46 $(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
47
48.PHONY: clean
49clean:
50 $(RM) $(OBJECTS) $(EXECUTABLE)