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