rjw | 6467d44 | 2022-05-17 16:03:18 +0800 | [diff] [blame] | 1 | SHELL = /bin/sh |
| 2 | RM = rm -f |
| 3 | |
| 4 | |
| 5 | LOCAL_CFLAGS := \ |
| 6 | -Wall \ |
| 7 | -g \ |
| 8 | -Wall \ |
| 9 | -fPIC \ |
| 10 | -shared \ |
| 11 | -D__COMPILE_OPTION__ \ |
| 12 | -D__LINUX_OS__ \ |
| 13 | |
| 14 | CPPFLAGS=\ |
| 15 | -std=c++11 \ |
| 16 | |
| 17 | LOCAL_PATH = . |
| 18 | $(warning ################# Typethree LOCAL_PATH:$(LOCAL_PATH),ROOT: $(ROOT),includedir:$(includedir),libdir:$(libdir)) |
| 19 | |
| 20 | LOCAL_C_INCLUDES = \ |
| 21 | -I$(LOCAL_PATH)/include \ |
| 22 | -I$(ROOT)$(includedir)/liblog \ |
| 23 | -I$(ROOT)$(includedir)/logger \ |
| 24 | -I$(ROOT)$(includedir)/include \ |
| 25 | |
| 26 | LOCAL_LIBS := \ |
| 27 | -L. \ |
| 28 | -ldl \ |
| 29 | -lrt \ |
| 30 | -llog \ |
| 31 | -lutils \ |
| 32 | -lcutils \ |
| 33 | -llynq-log \ |
rjw | 2733331 | 2022-06-08 14:16:44 +0800 | [diff] [blame] | 34 | -lpthread \ |
you.chen | 297fc09 | 2023-12-21 17:11:20 +0800 | [diff] [blame] | 35 | -llynq-codec \ |
rjw | 6467d44 | 2022-05-17 16:03:18 +0800 | [diff] [blame] | 36 | # -llynq-log \ |
| 37 | |
| 38 | $(warning libs=$(LOCAL_LIBS)) |
| 39 | |
| 40 | CXXSRC=\ |
| 41 | |
| 42 | SOURCES = $(wildcard *.c wildcard src/*.c) |
| 43 | |
| 44 | EXECUTABLE = liblynq-rtp.so |
| 45 | |
| 46 | COBJS=$(SOURCES:.c=.o) |
| 47 | $(warning test) |
| 48 | all: $(EXECUTABLE) |
| 49 | $(EXECUTABLE): $(COBJS) |
| 50 | $(CXX) -shared -Wl,--no-undefined $(COBJS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@ |
| 51 | |
| 52 | %.o: %.c |
| 53 | $(warning ----->build $<) |
| 54 | $(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $< |
| 55 | |
| 56 | .PHONY: install clean |
| 57 | install: |
| 58 | mkdir -p $(ROOT)$(base_libdir)/ |
| 59 | install $(EXECUTABLE) $(ROOT)$(base_libdir)/ |
| 60 | |
| 61 | clean: |
| 62 | rm -f $(EXECUTABLE) rm -rf *.o |
you.chen | 297fc09 | 2023-12-21 17:11:20 +0800 | [diff] [blame] | 63 | find ./ -name *.o | xargs rm -rf |