rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | SHELL = /bin/sh |
| 2 | RM = rm -f |
| 3 | |
| 4 | LOCAL_CFLAGS := -Wall \ |
| 5 | -g -Os \ |
| 6 | -flto \ |
| 7 | -fpermissive \ |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | LOCAL_PATH = . |
| 13 | |
| 14 | LOCAL_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 | |
| 24 | LOCAL_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 | |
| 35 | SOURCES = $(wildcard *.c) |
| 36 | |
| 37 | EXECUTABLE = lynq-udpcli |
| 38 | |
| 39 | OBJECTS=$(SOURCES:.c=.o) |
| 40 | all: $(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 |
| 49 | clean: |
| 50 | $(RM) $(OBJECTS) $(EXECUTABLE) |