-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only compile example snippets for make check (#59)
* Only compile example snippets for make check This snippets were compiled unconditionally which was a problem for cross-compilation scenarios (see #58). * Remove deprecated comment in Makefile
- Loading branch information
1 parent
3b03a04
commit d9ea41a
Showing
6 changed files
with
43 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 | ||
|
||
check_PROGRAMS = example | ||
testdata_dirpath = $(top_srcdir)/../../examples/testdata | ||
p4_name = p4 | ||
AM_CPPFLAGS = \ | ||
-I$(top_srcdir)/../../include \ | ||
-DTESTDATADIR=\"$(testdata_dirpath)\" | ||
fe_defines = pi_fe_defines_$(p4_name).h | ||
gen_fe_defines = $(top_builddir)/../../generators/pi_gen_fe_defines | ||
$(fe_defines) : $(testdata_dirpath)/simple_router.json $(gen_fe_defines) | ||
$(gen_fe_defines) -c $< -d $(abs_builddir) -n $(p4_name) | ||
example_SOURCES = example.cpp | ||
nodist_example_SOURCES = $(fe_defines) | ||
# This is a bit risky. See "Recording Dependencies manually" at | ||
# https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html#Built-Sources-Example | ||
example.$(OBJEXT) : $(fe_defines) | ||
|
||
if WITH_BMV2 | ||
LDADD = \ | ||
$(top_builddir)/../../src/libpi.la \ | ||
$(top_builddir)/libpifecpp.la \ | ||
$(top_builddir)/../../targets/bmv2/libpi_bmv2.la \ | ||
$(top_builddir)/../../src/libpip4info.la \ | ||
-lthrift -lruntimestubs -lsimpleswitch_thrift | ||
else | ||
LDADD = \ | ||
$(top_builddir)/../../src/libpi.la \ | ||
$(top_builddir)/libpifecpp.la \ | ||
$(top_builddir)/../../src/libpip4info.la \ | ||
$(top_builddir)/../../targets/dummy/libpi_dummy.la | ||
endif | ||
|
||
CLEANFILES = $(fe_defines) |
File renamed without changes.