41e066f2616989cdfa76270affa1f44d46059244
[vpp.git] / vnet / Makefile.am
1 # Copyright (c) 2015 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 AUTOMAKE_OPTIONS = foreign subdir-objects
15
16 AM_CFLAGS = -Wall @DPDK@ @VIRL@ @IPSEC@ @VCGN@ @IPV6SR@
17
18 libvnet_la_SOURCES =
19 libvnetplugin_la_SOURCES =
20 nobase_include_HEADERS =
21 noinst_PROGRAMS =
22 TESTS =
23
24 ########################################
25 # Generic stuff
26 ########################################
27 libvnet_la_SOURCES +=                                   \
28   vnet/config.c                                         \
29   vnet/handoff.c                                        \
30   vnet/interface.c                                      \
31   vnet/interface_cli.c                                  \
32   vnet/interface_format.c                               \
33   vnet/interface_output.c                               \
34   vnet/misc.c                                           \
35   vnet/replication.c                                    \
36   vnet/rewrite.c                                
37
38 nobase_include_HEADERS +=                       \
39   vnet/api_errno.h                              \
40   vnet/buffer.h                                 \
41   vnet/config.h                                 \
42   vnet/global_funcs.h                           \
43   vnet/handoff.h                                \
44   vnet/interface.h                              \
45   vnet/interface_funcs.h                        \
46   vnet/l3_types.h                               \
47   vnet/pipeline.h                               \
48   vnet/replication.h                            \
49   vnet/rewrite.h                                \
50   vnet/vnet.h
51
52 ########################################
53 # Policer infra
54 ########################################
55
56 libvnet_la_SOURCES +=                           \
57   vnet/policer/node_funcs.c                     \
58   vnet/policer/policer.c                        \
59   vnet/policer/xlate.c
60
61 nobase_include_HEADERS +=                       \
62   vnet/policer/police.h                         \
63   vnet/policer/policer.h                        \
64   vnet/policer/fix_types.h                      \
65   vnet/policer/xlate.h
66
67 ########################################
68 # Cop - junk filter
69 ########################################
70
71 libvnet_la_SOURCES +=                           \
72   vnet/cop/cop.c                                \
73   vnet/cop/node1.c                              \
74   vnet/cop/ip4_whitelist.c                      \
75   vnet/cop/ip6_whitelist.c      
76
77 nobase_include_HEADERS +=                       \
78   vnet/cop/cop.h
79
80 ########################################
81 # Layer 2 protocols go here
82 ########################################
83
84 ########################################
85 # Layer 2 protocol: Ethernet
86 ########################################
87 libvnet_la_SOURCES +=                           \
88  vnet/ethernet/arp.c                            \
89  vnet/ethernet/format.c                         \
90  vnet/ethernet/init.c                           \
91  vnet/ethernet/interface.c                      \
92  vnet/ethernet/node.c                           \
93  vnet/ethernet/pg.c
94
95 nobase_include_HEADERS +=                       \
96  vnet/ethernet/arp_packet.h                     \
97  vnet/ethernet/error.def                        \
98  vnet/ethernet/ethernet.h                       \
99  vnet/ethernet/packet.h                         \
100  vnet/ethernet/types.def
101
102 ########################################
103 # Layer 2 protocol: Ethernet bridging
104 ########################################
105 libvnet_la_SOURCES +=                           \
106  vnet/l2/feat_bitmap.c                          \
107  vnet/l2/l2_bd.c                                \
108  vnet/l2/l2_bvi.c                               \
109  vnet/l2/l2_classify.c                          \
110  vnet/l2/l2_efp_filter.c                        \
111  vnet/l2/l2_fib.c                               \
112  vnet/l2/l2_flood.c                             \
113  vnet/l2/l2_fwd.c                               \
114  vnet/l2/l2_input_acl.c                         \
115  vnet/l2/l2_input.c                             \
116  vnet/l2/l2_input_vtr.c                         \
117  vnet/l2/l2_learn.c                             \
118  vnet/l2/l2_output_acl.c                        \
119  vnet/l2/l2_output.c                            \
120  vnet/l2/l2_patch.c                             \
121  vnet/l2/l2_rw.c                                \
122  vnet/l2/l2_vtr.c                               \
123  vnet/l2/l2_xcrw.c
124
125 nobase_include_HEADERS +=                       \
126  vnet/l2/feat_bitmap.h                          \
127  vnet/l2/l2_input.h                             \
128  vnet/l2/l2_output.h                            \
129  vnet/l2/l2_vtr.h                               \
130  vnet/l2/l2_input_vtr.h                         \
131  vnet/l2/l2_efp_filter.h                        \
132  vnet/l2/l2_fwd.h                               \
133  vnet/l2/l2_bd.h                                \
134  vnet/l2/l2_bvi.h                               \
135  vnet/l2/l2_flood.h                             \
136  vnet/l2/l2_fib.h                               \
137  vnet/l2/l2_rw.h                                \
138  vnet/l2/l2_xcrw.h                              \
139  vnet/l2/l2_classify.h
140
141 ########################################
142 # Layer 2 protocol: SRP
143 ########################################
144 libvnet_la_SOURCES +=                           \
145  vnet/srp/format.c                              \
146  vnet/srp/interface.c                           \
147  vnet/srp/node.c                                \
148  vnet/srp/pg.c
149
150 nobase_include_HEADERS +=                       \
151  vnet/srp/packet.h                              \
152  vnet/srp/srp.h
153
154 ########################################
155 # Layer 2 protocol: PPP
156 ########################################
157 libvnet_la_SOURCES +=                           \
158   vnet/ppp/node.c                               \
159   vnet/ppp/pg.c                                 \
160   vnet/ppp/ppp.c
161
162 nobase_include_HEADERS +=                       \
163  vnet/ppp/error.def                             \
164  vnet/ppp/ppp.h                                 \
165  vnet/ppp/packet.h
166
167 ########################################
168 # Layer 2 protocol: HDLC
169 ########################################
170 libvnet_la_SOURCES +=                           \
171   vnet/hdlc/node.c                              \
172   vnet/hdlc/pg.c                                \
173   vnet/hdlc/hdlc.c
174
175 nobase_include_HEADERS +=                       \
176  vnet/hdlc/error.def                            \
177  vnet/hdlc/hdlc.h                               \
178  vnet/hdlc/packet.h
179
180 ########################################
181 # Layer 2 protocol: LLC
182 ########################################
183 libvnet_la_SOURCES +=                           \
184   vnet/llc/llc.c                                \
185   vnet/llc/node.c                               \
186   vnet/llc/pg.c
187
188 nobase_include_HEADERS +=                       \
189  vnet/llc/llc.h
190
191 ########################################
192 # Layer 2 protocol: SNAP
193 ########################################
194 libvnet_la_SOURCES +=                           \
195   vnet/snap/snap.c                              \
196   vnet/snap/node.c                              \
197   vnet/snap/pg.c
198
199 nobase_include_HEADERS +=                       \
200  vnet/snap/snap.h
201
202 ########################################
203 # Layer 2 / vxlan
204 ########################################
205 libvnet_la_SOURCES +=                           \
206   vnet/vxlan/vxlan.c                            \
207   vnet/vxlan/encap.c                            \
208   vnet/vxlan/decap.c    
209
210 nobase_include_HEADERS +=                       \
211   vnet/vxlan/vxlan.h                            \
212   vnet/vxlan/vxlan_packet.h                     \
213   vnet/vxlan/vxlan_error.def
214
215 ########################################
216 # Layer 2 / CDP
217 ########################################
218 libvnet_la_SOURCES +=                           \
219   vnet/cdp/cdp_input.c                          \
220   vnet/cdp/cdp_node.c                           \
221   vnet/cdp/cdp_periodic.c       
222
223 nobase_include_HEADERS +=                       \
224   vnet/cdp/cdp_protocol.h
225
226 ########################################
227 # Layer 2/3 "classify"
228 ########################################
229 libvnet_la_SOURCES +=                           \
230   vnet/classify/vnet_classify.c                 \
231   vnet/classify/ip_classify.c                   \
232   vnet/classify/input_acl.c                     \
233   vnet/classify/vnet_classify.h
234
235 nobase_include_HEADERS +=                       \
236   vnet/classify/vnet_classify.h                 \
237   vnet/classify/input_acl.h
238
239 ########################################
240 # Layer 3 protocols go here
241 ########################################
242
243 ########################################
244 # Layer 3 protocol: IP v4/v6
245 ########################################
246 libvnet_la_SOURCES +=                           \
247  vnet/ip/adj_alloc.c                            \
248  vnet/ip/format.c                               \
249  vnet/ip/icmp4.c                                \
250  vnet/ip/icmp6.c                                \
251  vnet/ip/ip46_cli.c                             \
252  vnet/ip/ip4_format.c                           \
253  vnet/ip/ip4_forward.c                          \
254  vnet/ip/ip4_hop_by_hop.c                       \
255  vnet/ip/ip4_input.c                            \
256  vnet/ip/ip4_mtrie.c                            \
257  vnet/ip/ip4_pg.c                               \
258  vnet/ip/ip4_source_check.c                     \
259  vnet/ip/ip6_format.c                           \
260  vnet/ip/ip6_forward.c                          \
261  vnet/ip/ip6_hop_by_hop.c                       \
262  vnet/ip/ip6_input.c                            \
263  vnet/ip/ip6_neighbor.c                         \
264  vnet/ip/ip6_pg.c                               \
265  vnet/ip/ip_checksum.c                          \
266  vnet/ip/ip.h                                   \
267  vnet/ip/ip_init.c                              \
268  vnet/ip/lookup.c                               \
269  vnet/ip/udp_format.c                           \
270  vnet/ip/udp_init.c                             \
271  vnet/ip/udp_local.c                            \
272  vnet/ip/udp_pg.c                               \
273  vnet/ip/ip_input_acl.c                         \
274  vnet/ip/ip_frag.c
275
276 nobase_include_HEADERS +=                       \
277  vnet/ip/adj_alloc.h                            \
278  vnet/ip/format.h                               \
279  vnet/ip/icmp46_packet.h                        \
280  vnet/ip/icmp4.h                                \
281  vnet/ip/icmp6.h                                \
282  vnet/ip/igmp_packet.h                          \
283  vnet/ip/ip.h                                   \
284  vnet/ip/ip4.h                                  \
285  vnet/ip/ip4_mtrie.h                            \
286  vnet/ip/ip4_error.h                            \
287  vnet/ip/ip4_packet.h                           \
288  vnet/ip/ip6.h                                  \
289  vnet/ip/ip6_error.h                            \
290  vnet/ip/ip6_hop_by_hop.h                       \
291  vnet/ip/ip6_hop_by_hop_packet.h                \
292  vnet/ip/ip6_packet.h                           \
293  vnet/ip/lookup.h                               \
294  vnet/ip/ip_packet.h                            \
295  vnet/ip/ports.def                              \
296  vnet/ip/protocols.def                          \
297  vnet/ip/tcp_packet.h                           \
298  vnet/ip/udp.h                                  \
299  vnet/ip/udp_error.def                          \
300  vnet/ip/udp_packet.h
301
302 ########################################
303 # Layer 3 protocol: IPSec
304 ########################################
305 if WITH_IPSEC
306 libvnet_la_SOURCES +=                           \
307  vnet/ipsec/ipsec.c                             \
308  vnet/ipsec/ipsec_cli.c                         \
309  vnet/ipsec/ipsec_format.c                      \
310  vnet/ipsec/ipsec_input.c                       \
311  vnet/ipsec/ipsec_if.c                          \
312  vnet/ipsec/ipsec_if_in.c                       \
313  vnet/ipsec/ipsec_if_out.c                      \
314  vnet/ipsec/esp_encrypt.c                       \
315  vnet/ipsec/esp_decrypt.c                       \
316  vnet/ipsec/ikev2.c                             \
317  vnet/ipsec/ikev2_crypto.c                      \
318  vnet/ipsec/ikev2_cli.c                         \
319  vnet/ipsec/ikev2_payload.c                     \
320  vnet/ipsec/ikev2_format.c
321 endif 
322
323 libvnet_la_SOURCES +=                           \
324  vnet/ipsec/ipsec_output.c
325
326 nobase_include_HEADERS +=                       \
327  vnet/ipsec/ipsec.h                             \
328  vnet/ipsec/esp.h                               \
329  vnet/ipsec/ikev2.h                             \
330  vnet/ipsec/ikev2_priv.h
331
332 ########################################
333 # Layer 3 protocol: osi
334 ########################################
335 libvnet_la_SOURCES +=                           \
336  vnet/osi/node.c                                \
337  vnet/osi/osi.c                                 \
338  vnet/osi/pg.c
339
340 nobase_include_HEADERS +=                       \
341  vnet/osi/osi.h
342
343 ########################################
344 # Layer 3 protocol: MAP
345 ########################################
346 libvnet_la_SOURCES +=                           \
347  vnet/map/map.c                                 \
348  vnet/map/ip4_map.c                             \
349  vnet/map/ip6_map.c                             \
350  vnet/map/sixrd.c                               \
351  vnet/map/ip4_sixrd.c                           \
352  vnet/map/ip6_sixrd.c                           \
353  vnet/map/ip4_map_t.c                           \
354  vnet/map/ip6_map_t.c
355
356 nobase_include_HEADERS +=                       \
357  vnet/map/map.h                                 \
358  vnet/map/sixrd.h
359
360 ########################################
361 # Tunnel protocol: gre
362 ########################################
363 libvnet_la_SOURCES +=                           \
364  vnet/gre/gre.c                                 \
365  vnet/gre/node.c                                \
366  vnet/gre/interface.c                           \
367  vnet/gre/pg.c
368  
369 nobase_include_HEADERS +=                       \
370  vnet/gre/gre.h                                 \
371  vnet/gre/packet.h                              \
372  vnet/gre/error.def
373
374 ########################################
375 # Tunnel protocol: l2tpv3
376 ########################################
377 libvnet_la_SOURCES +=                           \
378  vnet/l2tp/l2tp.c                               \
379  vnet/l2tp/encap.c                              \
380  vnet/l2tp/decap.c                              \
381  vnet/l2tp/pg.c
382  
383 nobase_include_HEADERS +=                       \
384  vnet/l2tp/l2tp.h                               \
385  vnet/l2tp/packet.h                             
386
387 ########################################
388 # Tunnel protocol: gre+mpls
389 ########################################
390 libvnet_la_SOURCES +=                           \
391  vnet/mpls-gre/mpls.c                           \
392  vnet/mpls-gre/node.c                           \
393  vnet/mpls-gre/interface.c                      \
394  vnet/mpls-gre/policy_encap.c                   \
395  vnet/mpls-gre/pg.c
396  
397 nobase_include_HEADERS +=                       \
398  vnet/mpls-gre/mpls.h                           \
399  vnet/mpls-gre/packet.h                         \
400  vnet/mpls-gre/error.def
401
402
403 ########################################
404 # Tunnel protocol: vxlan-gpe
405 ########################################
406
407 libvnet_la_SOURCES +=                           \
408  vnet/vxlan-gpe/vxlan_gpe.c                     \
409  vnet/vxlan-gpe/encap.c                         \
410  vnet/vxlan-gpe/decap.c
411
412 nobase_include_HEADERS +=                       \
413  vnet/vxlan-gpe/vxlan_gpe.h                     \
414  vnet/vxlan-gpe/vxlan_gpe_packet.h              \
415  vnet/vxlan-gpe/vxlan_gpe_error.def
416
417 ########################################
418 # LISP control plane: lisp-cp
419 ########################################
420
421 libvnet_la_SOURCES +=                           \
422  vnet/lisp-cp/lisp_types.c                      \
423  vnet/lisp-cp/control.c                         \
424  vnet/lisp-cp/gid_dictionary.c                  \
425  vnet/lisp-cp/lisp_msg_serdes.c                 \
426  vnet/lisp-cp/packets.c                 
427
428 nobase_include_HEADERS +=                       \
429  vnet/lisp-cp/lisp_types.h                      \
430  vnet/lisp-cp/packets.h                         \
431  vnet/lisp-cp/gid_dictionary.h                  \
432  vnet/lisp-cp/lisp_cp_messages.h                \
433  vnet/lisp-cp/lisp_msg_serdes.h                 \
434  vnet/lisp-cp/control.h                         
435
436
437 if ENABLE_TESTS
438 LDS = -lvppinfra -l:libvlib.a -l:libdpdk.a -l:libvlibmemory.a \
439         -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
440
441 TESTS += test_cp_serdes test_lisp_types
442
443 test_cp_serdes_SOURCES =                        \
444  test/lisp-cp/test_cp_serdes.c          \
445  vnet/lisp-cp/lisp_msg_serdes.c                 \
446  vnet/lisp-cp/lisp_types.c                      \
447  vnet/lisp-cp/packets.c                         \
448  vnet/ip/ip_checksum.c
449
450 test_lisp_types_SOURCES =                       \
451  test/lisp-cp/test_lisp_types.c         \
452  vnet/lisp-cp/lisp_types.c
453
454 test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
455 test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
456
457 test_cp_serdes_LDADD = libvnet.la $(LDS)
458 test_lisp_types_LDADD = libvnet.la $(LDS)
459
460 test_cp_serdes_LDFLAGS = -static
461 test_lisp_types_LDFLAGS = -static
462 endif
463
464 ########################################
465 # Tunnel protocol: lisp-gpe
466 ########################################
467
468 libvnet_la_SOURCES +=                           \
469  vnet/lisp-gpe/lisp_gpe.c                       \
470  vnet/lisp-gpe/interface.c                      \
471  vnet/lisp-gpe/ip_forward.c                     \
472  vnet/lisp-gpe/decap.c                          
473
474 nobase_include_HEADERS +=                       \
475  vnet/lisp-gpe/lisp_gpe.h                       \
476  vnet/lisp-gpe/lisp_gpe_packet.h                \
477  vnet/lisp-gpe/lisp_gpe_error.def               
478
479 if ENABLE_TESTS
480 TESTS += test_test
481
482 test_test_SOURCES = test/lisp-gpe/test.c
483
484 test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
485
486 test_test_LDADD = $(LIBOBJS)
487
488 noinst_PROGRAMS += $(TESTS)
489 check_PROGRAMS = $(TESTS)
490 endif
491
492 ########################################
493 # DHCP client
494 ########################################
495 libvnet_la_SOURCES +=                           \
496  vnet/dhcp/client.c                             \
497  vnet/dhcp/client.h     
498
499 nobase_include_HEADERS +=                       \
500  vnet/dhcp/client.h     
501
502 ########################################
503 # DHCP proxy
504 ########################################
505 libvnet_la_SOURCES +=                           \
506  vnet/dhcp/proxy_node.c                         \
507  vnet/dhcp/proxy.h
508  
509 nobase_include_HEADERS +=                       \
510  vnet/dhcp/packet.h                             \
511  vnet/dhcp/proxy.h                              \
512  vnet/dhcp/proxy_error.def
513
514 ########################################
515 # ipv6 segment routing
516 ########################################
517
518 if WITH_IPV6SR
519 libvnet_la_SOURCES +=                           \
520  vnet/sr/sr.c                                   \
521  vnet/sr/sr_replicate.c
522 endif
523  
524 nobase_include_HEADERS +=                       \
525  vnet/sr/sr_packet.h                            \
526  vnet/sr/sr_error.def                           \
527  vnet/sr/sr.h
528
529 ########################################
530 # CGN
531 #########################################
532
533 if WITH_VCGN
534 libvnet_la_SOURCES +=                                           \
535  vnet/vcgn/cnat_bulk_port.c                                     \
536  vnet/vcgn/cnat_config.c                                        \
537  vnet/vcgn/cnat_db_scanner.c                                    \
538  vnet/vcgn/cnat_db_v2.c                                         \
539  vnet/vcgn/cnat_debug_msg_handler.c                             \
540  vnet/vcgn/cnat_cli_handler.c                                   \
541  vnet/vcgn/cnat_global.c                                        \
542  vnet/vcgn/cnat_ipv4_udp_inside_input.c                         \
543  vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c              \
544  vnet/vcgn/cnat_ipv4_udp_outside_input.c                        \
545  vnet/vcgn/cnat_ipv4_tcp_inside_input.c                         \
546  vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c              \
547  vnet/vcgn/cnat_ipv4_tcp_outside_input.c                        \
548  vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c                  \
549  vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c        \
550  vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c                 \
551  vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c                  \
552  vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c                 \
553  vnet/vcgn/cnat_logging.c                                       \
554  vnet/vcgn/cnat_ports.c                                         \
555  vnet/vcgn/cnat_util.c                                          \
556  vnet/vcgn/cnat_show.c                                          \
557  vnet/vcgn/cnat_syslog.c                                        \
558  vnet/vcgn/cnat_v4_functions.c                                  \
559  vnet/vcgn/index_list.c                                         \
560  vnet/vcgn/spp_platform_trace_log.c                             \
561  vnet/vcgn/vcgn_classify.c
562 endif
563
564 ########################################
565 # DHCPv6 proxy
566 ########################################
567 libvnet_la_SOURCES +=                           \
568  vnet/dhcpv6/proxy_node.c
569  
570 nobase_include_HEADERS +=                       \
571  vnet/dhcpv6/packet.h                           \
572  vnet/dhcpv6/proxy.h                            \
573  vnet/dhcpv6/proxy_error.def
574
575 ########################################
576 # IPFIX / netflow v10 
577 ########################################
578 libvnet_la_SOURCES +=                           \
579  vnet/flow/flow_report.c
580
581 nobase_include_HEADERS +=                       \
582  vnet/flow/flow_report.h                        \
583  vnet/flow/ipfix_info_elements.h                \
584  vnet/flow/ipfix_packet.h
585
586 ########################################
587 # IPFIX sample code
588 ########################################
589
590 libvnet_la_SOURCES +=                           \
591   vnet/flow/flow_report_sample.c
592
593 nobase_include_HEADERS +=                       \
594   vnet/flow/flow_report_sample.h
595
596 ########################################
597 # lawful intercept
598 ########################################
599
600 libvnet_la_SOURCES +=                           \
601   vnet/lawful-intercept/lawful_intercept.c      \
602   vnet/lawful-intercept/node.c
603
604 nobase_include_HEADERS +=                       \
605   vnet/dpdk_replication.h                       \
606   vnet/lawful-intercept/lawful_intercept.h
607
608 ########################################
609 # Packet generator
610 ########################################
611
612 libvnet_la_SOURCES +=                           \
613   vnet/pg/cli.c                                 \
614   vnet/pg/edit.c                                \
615   vnet/pg/init.c                                \
616   vnet/pg/input.c                               \
617   vnet/pg/output.c                              \
618   vnet/pg/stream.c
619
620 nobase_include_HEADERS +=                       \
621   vnet/pg/pg.h                                  \
622   vnet/pg/edit.h
623
624 ########################################
625 # Intel DPDK
626 ########################################
627 if WITH_DPDK
628 libvnet_la_SOURCES +=                           \
629   vnet/devices/dpdk/dpdk_priv.h         \
630   vnet/devices/dpdk/device.c            \
631   vnet/devices/dpdk/format.c            \
632   vnet/devices/dpdk/init.c                      \
633   vnet/devices/dpdk/node.c                      \
634   vnet/devices/dpdk/threads.c       \
635   vnet/devices/dpdk/vhost_user.c    \
636   vnet/devices/dpdk/cli.c
637
638 nobase_include_HEADERS +=                       \
639   vnet/devices/dpdk/dpdk.h                      \
640   vnet/devices/dpdk/threads.h
641 else
642 libvnet_la_SOURCES +=                           \
643   vnet/devices/nic/ixge.c                       \
644   vnet/devices/nic/ixge.h                       \
645   vnet/devices/nic/sfp.c                        \
646   vnet/devices/nic/sfp.h
647 endif
648
649 ########################################
650 # virtio
651 ########################################
652
653 if WITH_DPDK
654 libvnet_la_SOURCES +=       \
655   vnet/devices/virtio/vhost-user.c
656
657 nobase_include_HEADERS +=     \
658   vnet/devices/virtio/vhost-user.h
659 endif WITH_DPDK
660
661 ########################################
662 # ssvm ethernet
663 ########################################
664 libvnet_la_SOURCES +=                           \
665   vnet/devices/ssvm/ssvm_eth.c                  \
666   vnet/devices/ssvm/node.c
667
668 nobase_include_HEADERS +=                       \
669   vnet/devices/ssvm/ssvm_eth.h
670
671 ########################################
672 # Linux packet interface
673 ########################################
674
675 libvnet_la_SOURCES +=                           \
676   vnet/devices/af_packet/af_packet.c            \
677   vnet/devices/af_packet/device.c               \
678   vnet/devices/af_packet/node.c                 \
679   vnet/devices/af_packet/cli.c
680
681 nobase_include_HEADERS +=                       \
682   vnet/devices/af_packet/af_packet.h
683
684 ########################################
685 # NETMAP interface
686 ########################################
687
688 libvnet_la_SOURCES +=                           \
689   vnet/devices/netmap/netmap.c                  \
690   vnet/devices/netmap/device.c                  \
691   vnet/devices/netmap/node.c                    \
692   vnet/devices/netmap/cli.c
693
694 nobase_include_HEADERS +=                       \
695   vnet/devices/netmap/netmap.h
696
697
698 ########################################
699 # Unix kernel related
700 ########################################
701
702 # FIXME: vnet/unix/hgshm.c 
703
704 libvnet_la_SOURCES +=                           \
705   vnet/unix/gdb_funcs.c                         \
706   vnet/unix/pcap.c                              \
707   vnet/unix/tapcli.c                            \
708   vnet/unix/tuntap.c
709
710 nobase_include_HEADERS +=                       \
711   vnet/unix/pcap.h                              \
712   vnet/unix/tuntap.h                            \
713   vnet/unix/tapcli.h
714
715 ########################################
716 # Plugin client library
717 ########################################
718
719 libvnetplugin_la_SOURCES +=                    \
720   vnet/plugin/p1.c
721
722 nobase_include_HEADERS +=                      \
723   vnet/plugin/plugin.h
724
725 ########################################
726 # Service Chain verification util
727 ########################################
728 libvnet_la_SOURCES +=       \
729  vnet/lib-scv/scv_util.c
730
731 nobase_include_HEADERS +=                       \
732  vnet/lib-scv/scv_util.h                        \
733  vnet/lib-scv/math64.h
734
735 lib_LTLIBRARIES = libvnet.la libvnetplugin.la
736
737 dpdk_libs = 
738
739 if WITH_DPDK
740 dpdk_libs += -l:libdpdk.a
741 endif
742
743 pcap2pg_SOURCES =                               \
744   vnet/unix/pcap2pg.c                           \
745   vnet/unix/pcap.h
746
747 pcap2pg_LDFLAGS = -static
748 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
749
750 noinst_PROGRAMS += pcap2pg
751
752