Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn libfrontend.a into a libtool library #244

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ GEN_UNIFIED_CPP=$(TOOLSDIR)/gen-unified-sources.py
.l.c:
$(LEX.l) $< > $@

# Variables that are appended to in sub-Makefiles
# Please use += to add values to these variables
# The first 7 are standard automake variables
################ Variables populated in subproject Makefiles
# Please use += to append values to these variables.

# Standard automake variables.
CLEANFILES = # Files to remove on clean
bin_PROGRAMS = # Binaries built
noinst_LTLIBRARIES = # Libtool convenience libraries
noinst_HEADERS = # Headers that are not installed
noinst_LIBRARIES = # Static libraries built
noinst_PROGRAMS = # Binaries built that are not installed
BUILT_SOURCES = # Generated source files
TESTS = # Tests to execute

# Variables specific to our build system.
XFAIL_TESTS = $(IFAIL_TESTS) # Tests that are supposed to fail
IFAIL_TESTS = # intermittent failures
export XFAIL_TESTS
Expand All @@ -44,6 +48,8 @@ cpplint_FILES = # Files that should be passed to cpplint (and eta
ir_DEF_FILES = # Files that generate the IR
extension_frontend_SOURCES = # Files added to libfrontend by extensions

################ Subproject Makefile inclusions

include $(srcdir)/lib/Makefile.am
include $(srcdir)/tools/ir-generator/Makefile.am
include $(srcdir)/ir/Makefile.am
Expand Down Expand Up @@ -82,8 +88,8 @@ BUILT_SOURCES += \
################

# Front-end library
noinst_LIBRARIES += libfrontend.a
libfrontend_a_SOURCES = \
noinst_LTLIBRARIES += libfrontend.la
libfrontend_la_SOURCES = \
setup.h \
setup.cpp \
$(frontend_SOURCES) \
Expand Down
2 changes: 1 addition & 1 deletion backends/bmv2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# To be included in the main P4C compiler makefile

bin_PROGRAMS += p4c-bm2-ss
p4c_bm2_ss_LDADD = libfrontend.a libp4ctoolkit.a
p4c_bm2_ss_LDADD = libfrontend.la libp4ctoolkit.a

p4c_bm2_ss_UNIFIED = \
backends/bmv2/bmv2.cpp \
Expand Down
2 changes: 1 addition & 1 deletion backends/ebpf/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# To be included in the main P4C compiler makefile

bin_PROGRAMS += p4c-ebpf
p4c_ebpf_LDADD = libfrontend.a libp4ctoolkit.a
p4c_ebpf_LDADD = libfrontend.la libp4ctoolkit.a

p4c_ebpf_UNIFIED = \
backends/ebpf/p4c-ebpf.cpp \
Expand Down
2 changes: 1 addition & 1 deletion backends/p4test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# To be included in the main P4C compiler makefile

noinst_PROGRAMS += p4test
p4test_LDADD = libfrontend.a libp4ctoolkit.a
p4test_LDADD = libfrontend.la libp4ctoolkit.a

p4test_UNIFIED = \
backends/p4test/p4test.cpp \
Expand Down
16 changes: 8 additions & 8 deletions test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ path_test_SOURCES = test/unittests/path_test.cpp
path_test_LDADD = libp4ctoolkit.a
json_test_SOURCES = test/unittests/json_test.cpp
json_test_LDADD = libp4ctoolkit.a
call_graph_test_SOURCES = $(ir_SOURCES) test/unittests/call_graph_test.cpp
call_graph_test_LDADD = libp4ctoolkit.a libfrontend.a
unittest_transform1_SOURCES = $(ir_SOURCES) test/unittests/transform1.cpp
unittest_transform1_LDADD = libfrontend.a libp4ctoolkit.a
dumpjson_SOURCES = $(ir_SOURCES) test/unittests/dumpjson.cpp
dumpjson_LDADD = libfrontend.a libp4ctoolkit.a
opeq_test_SOURCES = $(ir_SOURCES) test/unittests/opeq_test.cpp
opeq_test_LDADD = libfrontend.a libp4ctoolkit.a
call_graph_test_SOURCES = test/unittests/call_graph_test.cpp
call_graph_test_LDADD = libp4ctoolkit.a libfrontend.la
unittest_transform1_SOURCES = test/unittests/transform1.cpp
unittest_transform1_LDADD = libfrontend.la libp4ctoolkit.a
dumpjson_SOURCES = test/unittests/dumpjson.cpp
dumpjson_LDADD = libfrontend.la libp4ctoolkit.a
opeq_test_SOURCES = test/unittests/opeq_test.cpp
opeq_test_LDADD = libfrontend.la libp4ctoolkit.a

# Compiler tests

Expand Down