dynamic linking for mod capwap
FossilOrigin-Name: e31f9c799d5c0bf4fb449f0e8a648353aea272a394ef2cf0c2e0f83a8e973026
This commit is contained in:
parent
dbd934e9fe
commit
a71b86b125
@ -349,7 +349,7 @@ $(SNAME) : $(OBJS) $(MODOBJS)
|
||||
|
||||
$(DNAME) : $(OBJS) $(MODOBJS)
|
||||
@mkdir -p $(LIBARCHDIR)
|
||||
@echo " AR $(DNAME)"
|
||||
@echo " $(CC) $(DNAME)"
|
||||
@$(CC) $(LDFLAGS) -shared -o $(DNAME) $(OBJS) $(MODOBJS) $(LIBS)
|
||||
|
||||
|
||||
|
@ -1,32 +1,38 @@
|
||||
include ../../Macros.mak
|
||||
include ../../Config.mak
|
||||
include ../../Config.local.mak
|
||||
|
||||
|
||||
OBJS:=$(patsubst %.o,$(ARCH)/%.o,$(OBJS))
|
||||
OBJS:=$(patsubst %.o,$(OBJDIR)/%.o,$(OBJS))
|
||||
|
||||
|
||||
CFLAGS = -fPIC -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 $(COMPDEFS) -DWITH_RMAC_SUPPORT -I ../../ -I../ -I../../include
|
||||
|
||||
LIBDIR=../../lib/$(ARCH)
|
||||
|
||||
SRCS = $(OBJS:.o=.c)
|
||||
|
||||
$(ARCH)/%.o:%.c
|
||||
@mkdir -p $(ARCH)
|
||||
@echo " CC "$<
|
||||
all: $(SNAME) $(DNAME)
|
||||
|
||||
$(OBJDIR)/%.o:%.c
|
||||
@mkdir -p $(OBJDIR)
|
||||
@echo " $(CC) "$<
|
||||
@$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
|
||||
$(LIBDIR)/$(NAME) : $(OBJS) $(MODOBJS)
|
||||
$(SNAME) : $(OBJS) $(MODOBJS)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@echo " AR $(LIBDIR)/$(NAME)"
|
||||
@$(AR) rcs $(LIBDIR)/$(NAME) $(OBJS) $(MODOBJS)
|
||||
$(CC) -L$(LIBDIR) $(OBJS) $(MODOBJS) $(SLIBS) -v -shared -o ../../../lib/actube/capwap.so
|
||||
@echo " $(AR) $(SNAME)"
|
||||
@$(AR) rcs $(SNAME) $(OBJS) $(MODOBJS)
|
||||
|
||||
$(DNAME) : $(OBJS) $(MODOBJS)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@echo " $(CC) $(DNAME)"
|
||||
@$(CC) $(LDFLAGS) -shared -o $(DNAME) $(OBJS) $(MODOBJS) $(LIBS)
|
||||
|
||||
# $(CC) -L$(LIBDIR) $(OBJS) $(MODOBJS) $(SLIBS) -v -shared -o ../../../lib/actube/capwap.so
|
||||
|
||||
|
||||
all: $(LIBDIR)/$(NAME)
|
||||
|
||||
clean:
|
||||
rm -rf $(ARCH)
|
||||
rm -f $(LIBDIR)/$(NAME)
|
||||
rm -rf $(OBJDIR)
|
||||
rm -f $(SNAME)
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
include ../../Macros.mak
|
||||
include ../../Config.mak
|
||||
include ../../Config.local.mak
|
||||
|
||||
|
||||
|
||||
OBJS=\
|
||||
mod_capwap_ac.o \
|
||||
@ -12,11 +17,13 @@ OBJS=\
|
||||
capwap_in_wtp_descriptor.o \
|
||||
capwap_out_ac_ip_list.o \
|
||||
capwap_in_session_id.o \
|
||||
# capwap_in
|
||||
|
||||
|
||||
NAME=libcapwap.a
|
||||
SLIBS=-lcw
|
||||
LIBDIR := ../../../lib/$(ARCH)
|
||||
OBJDIR := ../../../obj/mod_capwap/$(ARCH)
|
||||
SNAME := $(LIBDIR)/libcapwap.a
|
||||
DNAME := $(LIBDIR)/capwap.so
|
||||
SLIBS := -lcw
|
||||
|
||||
include ../Mod.mak
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user