#
#  $Id: Makefile,v 1.1.1.1 1999/10/25 14:03:47 jack Exp $
#
# Templates/Makefile.leaf
# 	Template leaf node Makefile
#

PGMS=${ARCH}/snmpd

# C source names, if any, go here -- minus the .c

C_PIECES= \
    init \
    snmpd \
    snmp_vars \
    snmp2p \
    kernel \
    snmp_agent \
    view_parse \
    util_funcs \
    agent_read_config \
    auto_nlist

    
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)

H_FILES= \
    snmpd.h \
    agent_read_config.h \
    auto_nlist.h \
    autonlist.h \
    kernel.h \
    m2m.h \
    snmp_agent.h \
    snmp_vars.h \
    snmp_vars_m2m.h \
    mib_module_dot_conf.h \
    mib_module_includes.h \
    mib_module_inits.h \
    mib_module_loads.h \
    mib_module_shutdown.h \
    mibdefs.h \
    mibincl.h \
    struct.h \
    util_funcs.h \
    var_struct.h \
    networkconfig.h

SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)

# List of RTEMS managers to be included in the application goes here.
# Use:
#MANAGERS=all
# to include all RTEMS managers in the application.
MANAGERS=io event semaphore

include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/leaf.cfg

#
# (OPTIONAL) Add local stuff here using +=
#

DEFINES  += -Drtems
CPPFLAGS +=
CFLAGS += -I. -I./../ -I./../..  
CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000
            
#
# CFLAGS_DEBUG_V are used when the `make debug' target is built.
# To link your application with the non-optimized RTEMS routines,
# uncomment the following line:
# CFLAGS_DEBUG_V += -qrtems_debug
#

LD_PATHS  += 
LD_LIBS   +=  \
             ../mibgroup/examples/${ARCH}/example.o \
             ../mibgroup/examples/${ARCH}/wombat.o \
             -L../../snmplib/${ARCH} \
             -lsnmp
              
#
# Add your list of files to delete here.  The config files
#  already know how to delete some stuff, so you may want
#  to just run 'make clean' first to see what gets missed.
#  'make clobber' already includes 'make clean'
#

CLEAN_ADDITIONS += 
CLOBBER_ADDITIONS +=

all:	${ARCH} $(SRCS) $(PGMS)

${ARCH}/snmpd: ${OBJS} ${LINK_FILES}
	$(make-exe)

# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
install:  all
	$(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
