Files
m241Neelima/components/ip_net2-6.9/ipmpls/gmake/ipmpls.mk
T
2026-07-30 11:19:44 +05:30

101 lines
3.0 KiB
Makefile

#############################################################################
# IPTCP.MK
#
# Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmpls.mk,v $ $Revision: 1.8 $
# $Source: /home/interpeak/CVSRoot/ipmpls/gmake/ipmpls.mk,v $
# $Author: jonas $ $Date: 2009-03-12 11:51:30 $
# $State: Exp $ $Locker: $
#
# INTERPEAK_COPYRIGHT_STRING
#
#############################################################################
#############################################################################
# PRODUCT
###########################################################################
IPPROD ?= ipmpls
#############################################################################
# DEFINE
###########################################################################
IPDEFINE += -DIPMPLS
IPDEFINE += -DIPMPLS_MULTIPLE_ROUTE_TABLES
#############################################################################
# INCLUDE
###########################################################################
IPINCLUDE += -I$(IPMPLS_ROOT)/config
IPINCLUDE += -I$(IPMPLS_ROOT)/include
IPINCLUDE += -I$(IPMPLS_ROOT)/src
#############################################################################
# OBJECTS
###########################################################################
ifneq ($(IPPORT),las)
# Configuration
IPLIBOBJECTS_C += ipmpls_config.o
# Main
IPLIBOBJECTS += ipmpls.o
IPLIBOBJECTS += ipmpls_ioctl.o
endif
ifneq ($(IPPORT),lkm)
IPLIBOBJECTS += ipmpls_cmd_mplsctl.o
endif
# Compiles the xxx_config.o if the $SKIP_CONFIG macro is either not defined
# or set to anything other than true.
ifneq ($(SKIP_CONFIG),true)
IPLIBOBJECTS += $(IPLIBOBJECTS_C)
endif
#############################################################################
# VPATH
###########################################################################
IPSRCDIRS += $(IPMPLS_ROOT)/src $(IPMPLS_ROOT)/config
#############################################################################
# LIB
###########################################################################
IPLIBS += $(IPLIBROOT)/libipmpls.a
#############################################################################
# BINARIES
#############################################################################
ifeq ($(IPPORT),las)
# Path to binaries
IPCMDDIR := $(IPOBJDIR)/bin
# List of shell commands to build
IPMPLSSHELLCMDS = mplsctl
_IPMPLSSHELLCMDS = $(addprefix $(IPCMDDIR)/,$(IPMPLSSHELLCMDS))
bin: $(_IPMPLSSHELLCMDS)
$(IPOBJDIR)/ipmpls_cmd_%.o: $(IPMPLS_ROOT)/src/ipmpls_cmd_%.c
@$(IPECHO) "+++ Compiling IPMPLS shell command $<"
$(IPVERB)$(IPCC) -Dipmpls_cmd_$*=ipcom_cmd_entry_point $(IPCFLAGS) -o $@ $<
$(IPCMDDIR)/%: $(IPOBJDIR)/ipmpls_cmd_%.o $(IPOBJDIR)/ipcom_shell_cmd_stub.o
@$(IPECHO) "+++ Linking IPMPLS shell command $@"
$(IPVERB)$(IPLD) -o $@ $(IPLDFLAGS) $^ $(IPLIBS) $(IPLIBS) $(IPLIBS) $(IPLASTLIBS)
endif
###########################################################################
# END OF IPMPLS.MK
###########################################################################