Add compile Makefile
This commit is contained in:
parent
03b6a1b405
commit
8048685a7c
|
@ -0,0 +1,37 @@
|
|||
include $(TINA_BUILD_TOP)/package/netease/Makefile.common
|
||||
|
||||
GIT_TAG:=$(shell git describe --tags --always --dirty="-dev")
|
||||
TARGET := libpv1comm.so
|
||||
|
||||
commonSources := \
|
||||
log/hexdump.c \
|
||||
log/log.c \
|
||||
Framework/libuvEngine/libuv_dbus.c \
|
||||
Framework/Network/inet_api.c \
|
||||
Framework/Skins/skin_res_vtbl.c \
|
||||
Framework/Timer/timer.c \
|
||||
Framework/Fifo/fifo.c
|
||||
|
||||
local_CFLAGS := -I./include -DPLATFORM_R16 -DCURRENT_VERSION=\"$(GIT_TAG)\"
|
||||
#local_CFLAGS += -DENABLE_COUNT_DEBUG
|
||||
|
||||
local_LDFLAGS := $(LIB_BUILD_COMMON_LIB)
|
||||
|
||||
OBJS = $(patsubst %.c, %.c.o, $(commonSources))
|
||||
|
||||
$(TARGET):$(OBJS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(local_CFLAGS) -o $@ $^ -fPIC -shared
|
||||
|
||||
$(OBJS):%.c.o:%.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(local_CFLAGS) -c $^ -o $@ -fPIC -shared
|
||||
|
||||
all: $(TARGET) install
|
||||
|
||||
clean:
|
||||
-rm $(OBJS) $(TARGET)
|
||||
install:
|
||||
mkdir -p $(INSTALL_PREFIX)/usr/lib
|
||||
cp $(TARGET) $(INSTALL_PREFIX)/usr/lib
|
||||
|
||||
mkdir -p $(INSTALL_PREFIX)/usr/include
|
||||
cp -r include/* $(INSTALL_PREFIX)/usr/include
|
Loading…
Reference in New Issue