Files
2026-07-30 11:19:44 +05:30

177 lines
5.2 KiB
Makefile

#############################################################################
# IPMIPMN.MK
#
# Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipmn.mk,v $ $Revision: 1.22 $
# $Source: /home/interpeak/CVSRoot/ipmipmn/gmake/ipmipmn.mk,v $
# $Author: jhorteli $ $Date: 2010-10-15 11:29:06 $
# $State: Exp $ $Locker: $
#
# Copyright 2000-2006 Interpeak AB (http://www.interpeak.se). All rights reserved.
#
#############################################################################
#
# Copyright (c) 2006 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#
# modification history
# --------------------
# 01a,31aug06,kch Build ipmipmn_config.o only if $(SKIP_CONFIG) is either
# not defined or set to anything other than true.
#
ifeq ($(IPMIPMN),)
ifneq ($(IPCOM_USE_INET),no)
IPMIPMN := yes
#############################################################################
# PRODUCT
###########################################################################
IPPROD ?= ipmipmn
#############################################################################
# DEFINE
###########################################################################
IPDEFINE += -DIPMIPMN
#############################################################################
# INCLUDE
###########################################################################
IPINCLUDE += -I$(IPMIPMN_ROOT)/config
IPINCLUDE += -I$(IPMIPMN_ROOT)/include
IPINCLUDE += -I$(IPMIPMN_ROOT)/src
#############################################################################
# OBJECTS
###########################################################################
# Common files
IPLIBOBJECTS += ipmipmn_pktbuf.o
IPLIBOBJECTS += ipmipmn_regext_test.o
#IPLIBOBJECTS += ipmipmn_regext_mobnet.o
# Library files.
#IPLIBOBJECTS += ipmipmn_node.o
IPLIBOBJECTS += ipmipmn_api.o
IPLIBOBJECTS += ipmipmn_api_pktbuf.o
IPLIBOBJECTS += ipmipmn_api_node.o
IPLIBOBJECTS += ipmipmn_api_attr.o
IPLIBOBJECTS += ipmipmn_api_reg.o
IPLIBOBJECTS += ipmipmn_api_icmp.o
IPLIBOBJECTS += ipmipmn_api_cli.o
IPLIBOBJECTS += ipmipmn_main.o
IPLIBOBJECTS += ipmipmn_cli.o
IPLIBOBJECTS += ipmipmn_icmp.o
IPLIBOBJECTS += ipmipmn_node.o
IPLIBOBJECTS += ipmipmn_route.o
IPLIBOBJECTS += ipmipmn_if.o
IPLIBOBJECTS += ipmipmn_pkt.o
IPLIBOBJECTS += ipmipmn_attr.o
IPLIBOBJECTS += ipmipmn_reg.o
# SNMP
ifneq ($(WIND_IPNET),true)
IPLIBOBJECTS += ipmipmn_mip_mib.o
endif
ifneq ($(IPPORT),lkm)
# If las, don't include the entry point files.
ifneq ($(IPPORT),las)
# Entry point files.
IPLIBOBJECTS += ipmipmn.o
IPLIBOBJECTS += ipmipmn_cmd_mn.o
# Configuration
IPLIBOBJECTS_C += ipmipmn_config.o
endif # LAS
# 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 += $(IPMIPMN_ROOT)/src $(IPMIPMN_ROOT)/config
#############################################################################
# LIB
###########################################################################
IPLIBS += $(IPLIBROOT)/libipmipmn.a
#############################################################################
# BINARIES
###########################################################################
ifeq ($(IPPORT),las)
# Path to binaries
IPCMDDIR := $(IPOBJDIR)/bin
IPDAEMONDIR := $(IPOBJDIR)/sbin
# List of shell commands to build
IPMIPMNCMDS = mn
_IPIPMIPMNCMDS = $(addprefix $(IPCMDDIR)/,$(IPMIPMNCMDS))
# List of daemons to build
IPMIPMND = mnd
_IPMIPMND = $(addprefix $(IPDAEMONDIR)/,$(IPMIPMND))
bin: $(_IPIPMIPMNCMDS) $(_IPMIPMND)
$(IPOBJDIR)/ipmipmn_cmd_mn.o: $(IPMIPMN_ROOT)/src/ipmipmn_cmd_mn.c
@$(IPECHO) "+++ Compiling IPMIPMN shell command $<"
$(IPVERB)$(IPCC) -Dipmipmn_cmd_mn=ipcom_cmd_entry_point $(IPCFLAGS) -o $@ $<
$(IPOBJDIR)/ipmipmn.o: $(IPMIPMN_ROOT)/src/ipmipmn.c
@$(IPECHO) "+++ Compiling IPMIPMN daemon $<"
$(IPVERB)$(IPCC) -Dipmipmn_proc=ipcom_daemon_entry_point -Dipmipmn_create=ipcom_daemon_create $(IPCFLAGS) -o $@ $<
$(IPOBJDIR)/ipmipmn_config.o: $(IPMIPMN_ROOT)/config/ipmipmn_config.c
@$(IPECHO) "+++ Compiling IPMIPMN configuration interface $<"
$(IPVERB)$(IPCC) -Dipmipmn_configure=ipcom_daemon_configure $(IPCFLAGS) -o $@ $<
# Linking shell commands and daemons
$(IPCMDDIR)/mn: $(IPOBJDIR)/ipmipmn_cmd_mn.o $(IPOBJDIR)/ipcom_shell_cmd_stub.o
@$(IPECHO) "+++ Linking IPMIPMN shell command $@"
$(IPVERB)$(IPLD) -o $@ $(IPLDFLAGS) $^ $(IPLIBS) $(IPLIBS) $(IPLIBS) $(IPLASTLIBS)
$(IPDAEMONDIR)/mnd: $(IPOBJDIR)/ipmipmn.o $(IPOBJDIR)/ipmipmn_config.o $(IPOBJDIR)/ipcom_daemon_stub.o
@$(IPECHO) "+++ Linking IPMIPMND daemon $@"
$(IPVERB)$(IPLD) -o $@ $(IPLDFLAGS) $^ $(IPLIBS) $(IPLIBS) $(IPLIBS) $(IPLASTLIBS)
endif # LAS
endif # LKM
endif # IPCOM_USE_INET
endif # IPMIPMN
###########################################################################
# END OF IPMIPMN.MK
###########################################################################