Mod aaa-12 描述:修改用户态pde的Makefile文件

RCA:
SOL:
修改人:gechangwei
检视人:gechangwei

Signed-off-by: gechangwei <gechangwei@cmhi.chinamobile.com>
This commit is contained in:
gechangwei 2019-06-21 14:07:53 +08:00
parent d17b77ec22
commit c08a22663d
3 changed files with 23 additions and 29 deletions

View File

@ -3,12 +3,17 @@
###################################### ######################################
#source file #source file
#源文件,自动找所有.c和.cpp文件并将目标定义为同名.o文件 #源文件,自动找所有.c和.cpp文件并将目标定义为同名.o文件
SOURCE := $(wildcard *.c) $(wildcard *.cpp) #SOURCE := $(wildcard *.c) $(wildcard *.cpp)
OBJS := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE))) #OBJS := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))
all: pdelivery_main dpi_rcv_test
.PHONY:all
OBJS1 = pdelivery_main.o
OBJS2 = dpi_rcv_test.o
#target you can change test to what you want #target you can change test to what you want
#目标文件名,输入任意你想要的执行文件名 #目标文件名,输入任意你想要的执行文件名
TARGET := pdeliv_main
#compile and lib parameter #compile and lib parameter
#编译参数 #编译参数
@ -20,25 +25,14 @@ INCLUDE := -I../lib -I../../../Common -I../netlink_uapi
CFLAGS := -g -Wall -O3 $(DEFINES) $(INCLUDE) CFLAGS := -g -Wall -O3 $(DEFINES) $(INCLUDE)
CXXFLAGS:= $(CFLAGS) -DHAVE_CONFIG_H CXXFLAGS:= $(CFLAGS) -DHAVE_CONFIG_H
pdelivery_main : $(OBJS1)
$(CC) $(CXXFLAGS) -o pdelivery_main $(OBJS1) $(LDFLAGS) $(LIBS)
#i think you should do anything here dpi_rcv_test : $(OBJS2)
#下面的基本上不需要做任何改动了 $(CC) $(CXXFLAGS) -o dpi_rcv_test $(OBJS2) $(LDFLAGS) $(LIBS)
.PHONY : everything objs clean veryclean rebuild
everything : $(TARGET) .PHONY:clean
all : $(TARGET)
objs : $(OBJS)
rebuild: veryclean everything
clean: clean:
rm -fr *.so -$(RM) pdelivery_main dpi_rcv_test $(OBJS1) $(OBJS2)
rm -fr *.o
veryclean : clean
rm -fr $(TARGET)
$(TARGET) : $(OBJS)
$(CC) $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)

View File

@ -8,7 +8,7 @@
#include "libnetlinku.h" #include "libnetlinku.h"
#include "commuapinl.h" #include "commuapinl.h"
#if 0 #if 1
static int process_pkt(struct pdelivnl_ctrl_data *ctrl, static int process_pkt(struct pdelivnl_ctrl_data *ctrl,

Binary file not shown.