1# Portions of this file are subject to the following copyright. See 2# the Net-SNMP's COPYING file for more details and other copyrights 3# that may apply: 4# 5# Portions of this file are copyrighted by: 6# Copyright � 2003 Sun Microsystems, Inc. All rights reserved. 7# Use is subject to license terms specified in the COPYING file 8# distributed with the Net-SNMP package. 9# 10 11# 12# Makefile for snmplib 13# 14 15mysubdir=snmplib 16 17# use GNU vpath, if available, to only set a path for source and headers 18# VPATH will pick up objects too, which is bad if you are sharing a 19# source dir... 20@GNU_vpath@ %.h $(srcdir) 21@GNU_vpath@ %.c $(srcdir) 22@GNU_vpath@ %.rc $(srcdir) 23# fallback to regular VPATH for non-gnu... 24@NON_GNU_VPATH@ $(srcdir) 25 26 27# 28# Things to install 29# 30 31# headers 32INSTALLHEADERS=\ 33 config_api.h \ 34 definitions.h \ 35 mib_api.h \ 36 net-snmp-includes.h \ 37 output_api.h \ 38 pdu_api.h \ 39 session_api.h \ 40 snmpv3_api.h \ 41 types.h \ 42 utilities.h \ 43 varbind_api.h \ 44 version.h 45 46INCLUDESUBDIR=library 47INCLUDESUBDIRHEADERS=README \ 48 asn1.h \ 49 callback.h \ 50 cert_util.h \ 51 check_varbind.h \ 52 container.h \ 53 container_binary_array.h \ 54 container_iterator.h \ 55 container_list_ssll.h \ 56 container_null.h \ 57 data_list.h \ 58 default_store.h \ 59 dir_utils.h \ 60 factory.h \ 61 fd_event_manager.h \ 62 file_utils.h \ 63 getopt.h \ 64 int64.h \ 65 keytools.h \ 66 large_fd_set.h \ 67 lcd_time.h \ 68 md5.h \ 69 mib.h \ 70 mt_support.h \ 71 netsnmp-attribute-format.h \ 72 oid.h \ 73 oid_stash.h \ 74 parse.h \ 75 read_config.h \ 76 scapi.h \ 77 snmp-tc.h \ 78 snmp.h \ 79 snmp_alarm.h \ 80 snmp_api.h \ 81 snmp_assert.h \ 82 snmp_client.h \ 83 snmp_debug.h \ 84 snmp_enum.h \ 85 snmp_impl.h \ 86 snmp_logging.h \ 87 snmp_parse_args.h \ 88 snmp_secmod.h \ 89 snmp_service.h \ 90 snmp_transport.h \ 91 snmpv3.h \ 92 system.h \ 93 text_utils.h \ 94 tools.h \ 95 transform_oids.h \ 96 types.h \ 97 ucd_compat.h \ 98 vacm.h \ 99 winpipe.h \ 100 winservice.h \ 101 @transport_hdr_list@ \ 102 @security_hdr_list@ 103 104INSTALLBUILTSUBDIRHEADERS=../include/net-snmp/library/snmpv3-security-includes.h 105INSTALLBUILTSUBDIR=library 106 107 108INSTALLUCDHEADERS=\ 109 asn1.h \ 110 callback.h \ 111 default_store.h \ 112 int64.h \ 113 keytools.h \ 114 large_fd_set.h \ 115 mib.h \ 116 parse.h \ 117 read_config.h \ 118 scapi.h \ 119 snmp-tc.h \ 120 snmp.h \ 121 snmp_alarm.h \ 122 snmp_api.h \ 123 snmp_client.h \ 124 snmp_debug.h \ 125 snmp_impl.h \ 126 snmp_logging.h \ 127 snmp_parse_args.h \ 128 snmp_vars.h \ 129 snmpusm.h \ 130 snmpv3.h \ 131 struct.h \ 132 system.h \ 133 tools.h \ 134 transform_oids.h 135 136# libraries 137INSTALLLIBS=libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) 138INSTALLUCDLIBS=libsnmp.$(LIB_EXTENSION)$(LIB_VERSION) 139 140# 141# Things to build 142# - for the feature checking / removal / minimialist support these 143# must be listed such that code requiring a feature must be listed 144# *before* the code implementing the feature. 145# 146CSRCS= snmp_client.c mib.c parse.c snmp_api.c snmp.c \ 147 snmp_auth.c asn1.c md5.c snmp_parse_args.c \ 148 system.c vacm.c int64.c read_config.c pkcs.c \ 149 snmp_debug.c tools.c snmp_logging.c text_utils.c \ 150 large_fd_set.c cert_util.c snmp_openssl.c \ 151 snmpv3.c lcd_time.c keytools.c \ 152 scapi.c callback.c default_store.c snmp_alarm.c \ 153 data_list.c oid_stash.c fd_event_manager.c \ 154 check_varbind.c \ 155 mt_support.c snmp_enum.c snmp-tc.c snmp_service.c \ 156 snprintf.c asprintf.c \ 157 snmp_transport.c @transport_src_list@ \ 158 snmp_secmod.c @security_src_list@ snmp_version.c \ 159 container_null.c container_list_ssll.c container_iterator.c \ 160 ucd_compat.c \ 161 @other_src_list@ @crypto_files_c@ \ 162 dir_utils.c file_utils.c \ 163 container.c container_binary_array.c 164 165OBJS= snmp_client.o mib.o parse.o snmp_api.o snmp.o \ 166 snmp_auth.o asn1.o md5.o snmp_parse_args.o \ 167 system.o vacm.o int64.o read_config.o pkcs.o \ 168 snmp_debug.o tools.o snmp_logging.o text_utils.o \ 169 large_fd_set.o cert_util.o snmp_openssl.o \ 170 snmpv3.o lcd_time.o keytools.o \ 171 scapi.o callback.o default_store.o snmp_alarm.o \ 172 data_list.o oid_stash.o fd_event_manager.o \ 173 check_varbind.o \ 174 mt_support.o snmp_enum.o snmp-tc.o snmp_service.o \ 175 snprintf.o asprintf.o \ 176 snmp_transport.o @transport_obj_list@ \ 177 snmp_secmod.o @security_obj_list@ snmp_version.o \ 178 container_null.o container_list_ssll.o container_iterator.o \ 179 ucd_compat.o \ 180 @crypto_files_o@ @other_objs_list@ @LIBOBJS@ \ 181 dir_utils.o file_utils.o \ 182 container.o container_binary_array.o 183 184LOBJS= snmp_client.lo mib.lo parse.lo snmp_api.lo snmp.lo \ 185 snmp_auth.lo asn1.lo md5.lo snmp_parse_args.lo \ 186 system.lo vacm.lo int64.lo read_config.lo pkcs.lo \ 187 snmp_debug.lo tools.lo snmp_logging.lo text_utils.lo \ 188 large_fd_set.lo cert_util.lo snmp_openssl.lo \ 189 snmpv3.lo lcd_time.lo keytools.lo \ 190 scapi.lo callback.lo default_store.lo snmp_alarm.lo \ 191 data_list.lo oid_stash.lo fd_event_manager.lo \ 192 check_varbind.lo \ 193 mt_support.lo snmp_enum.lo snmp-tc.lo snmp_service.lo \ 194 snprintf.lo asprintf.lo \ 195 snmp_transport.lo @transport_lobj_list@ \ 196 snmp_secmod.lo @security_lobj_list@ snmp_version.lo \ 197 container.lo container_binary_array.lo \ 198 ucd_compat.lo \ 199 @crypto_files_lo@ @other_lobjs_list@ @LTLIBOBJS@ \ 200 dir_utils.lo file_utils.lo \ 201 container_null.lo container_list_ssll.lo container_iterator.lo 202 203FTOBJS= snmp_client.ft mib.ft parse.ft snmp_api.ft snmp.ft \ 204 snmp_auth.ft asn1.ft md5.ft snmp_parse_args.ft \ 205 system.ft vacm.ft int64.ft read_config.ft pkcs.ft \ 206 snmp_debug.ft tools.ft snmp_logging.ft text_utils.ft \ 207 snmpv3.ft lcd_time.ft keytools.ft \ 208 scapi.ft callback.ft default_store.ft snmp_alarm.ft \ 209 data_list.ft oid_stash.ft fd_event_manager.ft \ 210 check_varbind.ft \ 211 mt_support.ft snmp_enum.ft snmp-tc.ft snmp_service.ft \ 212 snprintf.ft asprintf.ft \ 213 snmp_transport.ft @transport_ftobj_list@ \ 214 snmp_secmod.ft @security_ftobj_list@ snmp_version.ft \ 215 container.ft container_binary_array.ft \ 216 ucd_compat.ft \ 217 @other_ftobjs_list@ \ 218 large_fd_set.ft cert_util.ft snmp_openssl.ft \ 219 dir_utils.ft file_utils.ft \ 220 container_null.ft container_list_ssll.ft container_iterator.ft 221 222# just in case someone wants to remove libtool, change this to OBJS. 223TOBJS=$(LOBJS) 224 225FEATUREFILE = $(top_builddir)/include/net-snmp/library/features.h 226 227# 228CPPFLAGS = $(TOP_INCLUDES) -I. $(SNMPLIB_INCLUDES) @CPPFLAGS@ 229 230all: standardall 231 232# how to build the libraries. 233libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS) 234 $(LIB_LD_CMD) $@ $(TOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) @LNETSNMPLIBS@ 235 $(RANLIB) $@ 236 237libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS) 238 $(LIB_LD_CMD) $@ $(TOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) @LNETSNMPLIBS@ 239 $(RANLIB) $@ 240 241# 242# internal test objects 243# 244parse: mib.o parse.c 245 $(CC) $(CFLAGS) -DTEST parse.c -o $@ \ 246 `$(top_srcdir)/net-snmp-config --libs` 247