From 57a50baa57d5c41e7ad08f04c86056833cb04898 Mon Sep 17 00:00:00 2001 From: Helge Bahmann Date: Sun, 4 Feb 2024 15:36:48 +0100 Subject: [PATCH 1/2] Add rules for installable builds Add "jlm" prefix to a few library names to avoid name clashes with commonly used libraries. Support building shared libraries. Support setting install path, prefix etc. Add pkg-config files for util and rvsdg library (for now), so they can be installed and used more easily by external packages (via autotools, cmake, bazel, ...). --- Makefile.macros | 10 +++++++++ Makefile.rules | 34 ++++++++++++++++++---------- configure.sh | 35 +++++++++++++++++++++++++++++ jlm/hls/Makefile.sub | 6 +++-- jlm/llvm/Makefile.sub | 18 ++++++++------- jlm/llvm/ir/operators/operators.hpp | 2 +- jlm/mlir/Makefile.sub | 7 ++++-- jlm/rvsdg/Makefile.sub | 7 +++++- jlm/rvsdg/librvsdg.pc.in | 10 +++++++++ jlm/tooling/Makefile.sub | 7 ++++-- jlm/util/Makefile.sub | 32 +++++++++++++++++++++----- jlm/util/libjlmutil.pc.in | 9 ++++++++ tests/Makefile.sub | 3 +++ tools/Makefile.sub | 8 +++---- tools/jhls/Makefile.sub | 4 ++-- tools/jlm-hls/Makefile.sub | 4 ++-- 16 files changed, 154 insertions(+), 42 deletions(-) create mode 100644 jlm/rvsdg/librvsdg.pc.in create mode 100644 jlm/util/libjlmutil.pc.in diff --git a/Makefile.macros b/Makefile.macros index cab88c1af..77321ed06 100644 --- a/Makefile.macros +++ b/Makefile.macros @@ -16,6 +16,16 @@ # - libfoo_TEST_EXTRA_LDFLAGS: # additional LDFLAGS to be passed to link each test binary; # use this to pull in external libraries (not built in this project) +# - libfoo_SOVERSION: +# SOVERSION that is recorded in linker options whenever a binary +# is dynamically linked against this library +# Should be increased for every incompatible ABI change if library +# is deemed to be ABI-stable). +# REQUIRED if shared library builds are enabled +# - libfoo_VERSION: +# Detailed version of library. Should be increased with every +# feature addition if library is assumed to be forward-ABI-compatible +# REQUIRED if shared library builds are enabled # # Depending on configuration builds only static or both # static and dynamic library. Depending on configuration diff --git a/Makefile.rules b/Makefile.rules index 6908eb7ce..022864e15 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -5,7 +5,7 @@ EXECUTABLES += $(TARGET_EXECUTABLES) $(TEST_EXECUTABLES) $(COVERAGE_EXECUTABLES) GENERATED_FILES += $(EXECUTABLES) -all: $(SHARED_LIBRARIES) $(STATIC_LIBRARIES) $(EXECUTABLES) +all: $(SHARED_LIBRARIES) $(STATIC_LIBRARIES) $(EXECUTABLES) $(PKGCONFIG_FILES) # commands for generating various types of targets @@ -25,7 +25,7 @@ $(BUILD_OUT_PREFIX)%.la: %.cpp $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $< # static libraries -$(BUILD_OUT_PREFIX)%.a: BASENAME=$(patsubst %.a, %, $@) +$(BUILD_OUT_PREFIX)%.a: BASENAME=$(patsubst $(BUILD_OUT_PREFIX)%.a, %, $@) $(BUILD_OUT_PREFIX)%.a: @mkdir -p $(dir $@) rm -f $@ @@ -33,19 +33,26 @@ $(BUILD_OUT_PREFIX)%.a: ranlib $@ # dynamic libraries -$(BUILD_OUT_PREFIX)%.so: BASENAME=$(patsubst %.so,%,$@) +$(BUILD_OUT_PREFIX)%.so: BASENAME=$(patsubst $(BUILD_OUT_PREFIX)%.so,%,$@) $(BUILD_OUT_PREFIX)%.so: @mkdir -p $(dir $@) rm -rf $@ $@.$($(BASENAME)_VERSION) $@.$($(BASENAME)_SOVERSION) - $(DYNAMIC_MODULE_LINK) -o $@.$($(BASENAME)_VERSION) $^ -Wl,-soname -Wl,$@.$($(BASENAME)_SOVERSION) $(LIBS) - ln -sf $@.$($(BASENAME)_VERSION) $@.$($(BASENAME)_SOVERSION) - ln -sf $@.$($(BASENAME)_VERSION) $@ + $(DYNAMIC_MODULE_LINK) -o $@.$($(BASENAME)_VERSION) $^ -Wl,-soname -Wl,$(BASENAME).so.$($(BASENAME)_SOVERSION) $(LIBS) + ln -sf $(BASENAME).so.$($(BASENAME)_VERSION) $@.$($(BASENAME)_SOVERSION) + ln -sf $(BASENAME).so.$($(BASENAME)_VERSION) $@ # binaries $(EXECUTABLES): @mkdir -p $(dir $@) $(EXECUTABLE_LINK) -o $@ $(filter %.la, $^) $(filter %.lo, $^) $(LDFLAGS) $(LIBS) +################################################################################ +# pkgconfig substitution rules + +$(BUILD_OUT_PREFIX)%.pc: %.pc.in + @mkdir -p $(dir $@) + sed -e "s!@libdir@!$(libdir)!" -e "s!@includedir@!$(includedir)!" <$^ >$@ + ################################################################################ # Installation rules @@ -68,11 +75,12 @@ install-static: $(STATIC_LIBRARIES) $(INSTALL) -m 644 -v $$file $(DESTDIR)$(libdir)/ ; \ done -install-shared: $(patsubst %.so,install-shared-%,$(SHARED_LIBRARIES)) +install-shared: $(patsubst $(BUILD_OUT_PREFIX)%.so,install-shared-%,$(SHARED_LIBRARIES)) install-shared-%: BASENAME=$(patsubst install-shared-%,%,$@) install-shared-%: + echo "$@" mkdir -p $(DESTDIR)$(libdir)/ - $(INSTALL) -m 755 -v $(BASENAME).so.$($(BASENAME)_VERSION) $(DESTDIR)$(libdir)/ + $(INSTALL) -m 755 -v $(BUILD_OUT_PREFIX)$(BASENAME).so.$($(BASENAME)_VERSION) $(DESTDIR)$(libdir)/ $(RM) -rf $(DESTDIR)$(libdir)/$(BASENAME).so $(DESTDIR)$(libdir)/$(BASENAME).so.$($(BASENAME)_SOVERSION) ln -sf $(BASENAME).so.$($(BASENAME)_VERSION) $(DESTDIR)$(libdir)/$(BASENAME).so ln -sf $(BASENAME).so.$($(BASENAME)_VERSION) $(DESTDIR)$(libdir)/$(BASENAME).so.$($(BASENAME)_SOVERSION) @@ -151,24 +159,26 @@ $(BUILD_OUT_PREFIX)%.coverage.la: %.cpp $(COVERAGE_TESTS): $(BUILD_OUT_PREFIX)%.coverage : $(BUILD_OUT_PREFIX)%.coverage.la $(COVERAGE_TESTS): LDFLAGS += -pthread $(COVERAGEFLAGS) -coverage: $(COVERAGE_TESTS) .PHONY +coverage: $(COVERAGE_TESTS) for CTEST in $(COVERAGE_TESTS) ; do $$CTEST ; done mkdir -p $(BUILD_OUT_PREFIX)coverage gcovr $(BUILD_OUT_PREFIX) --html-details -o $(BUILD_OUT_PREFIX)coverage/coverage.html endif +.PHONY: coverage + ################################################################################ # Documentation rules docclean: - rm -rf doc + rm -rf docs -docs: .PHONY +docs: mkdir -p docs doxygen doxygen.conf -.PHONY: +.PHONY: docs ################################################################################# # Clang format rules diff --git a/configure.sh b/configure.sh index 02762f6ae..9f2730cb3 100755 --- a/configure.sh +++ b/configure.sh @@ -4,6 +4,7 @@ set -eu # Default values for all tunables. TARGET="release" ENABLE_ASSERTS="no" +ENABLE_SHARED="no" LLVM_CONFIG_BIN="llvm-config-16" ENABLE_COVERAGE="no" ENABLE_HLS= @@ -11,6 +12,10 @@ CIRCT_PATH= ENABLE_MLIR= MLIR_PATH= MLIR_LDFLAGS= +INSTALL=install +prefix="/usr/local" +includedir="" +libdir="" function usage() { @@ -27,6 +32,7 @@ function usage() echo " --enable-mlir PATH Sets the path to the MLIR RVSDG Dialect and enables" echo " building the MLIR backend and frontend. [${MLIR_PATH}]" echo " --enable-coverage Enable test coverage computation target." + echo " --enable-shared Enable building shared libraries." echo " --help Prints this message and stops." echo echo "Influential variables that can be set:" @@ -51,6 +57,10 @@ while [[ "$#" -ge 1 ]] ; do ENABLE_ASSERTS="yes" shift ;; + --enable-shared) + ENABLE_SHARED="yes" + shift + ;; --llvm-config) shift LLVM_CONFIG_BIN="$1" @@ -70,6 +80,18 @@ while [[ "$#" -ge 1 ]] ; do usage >&2 exit 1 ;; + --prefix=*) + prefix="${1#--prefix=}" + shift + ;; + --includedir=*) + includedir="${1#--includedir=}" + shift + ;; + --libdir=*) + libdir="${1#--libdir=}" + shift + ;; *=*) VARNAME=${1%%=*} VARVAL=${1#*=} @@ -83,6 +105,13 @@ while [[ "$#" -ge 1 ]] ; do esac done +if [ "${includedir}" == "" ] ; then + includedir="${prefix}/include" +fi + +if [ "${libdir}" == "" ] ; then + libdir="${prefix}/lib" +fi CXXFLAGS_COMMON="--std=c++17 -Wall -Wpedantic -Wextra -Wno-unused-parameter -Werror -Wfatal-errors -gdwarf-4 -g" CPPFLAGS_COMMON="-I. -Itests" @@ -138,6 +167,12 @@ MLIR_PATH=${MLIR_PATH} MLIR_LDFLAGS=${MLIR_LDFLAGS} LLVMCONFIG=${LLVM_CONFIG_BIN} ENABLE_COVERAGE=${ENABLE_COVERAGE} +ENABLE_SHARED=${ENABLE_SHARED} + +INSTALL=${INSTALL} +prefix=${prefix} +libdir=${libdir} +includedir=${includedir} EOF if [ ! -z "${CXX-}" ] ; then echo "CXX=${CXX}" diff --git a/jlm/hls/Makefile.sub b/jlm/hls/Makefile.sub index 873bf8aee..481ff61b8 100644 --- a/jlm/hls/Makefile.sub +++ b/jlm/hls/Makefile.sub @@ -46,11 +46,13 @@ libhls_TESTS += \ libhls_TEST_LIBS += \ libhls \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ libjlmtest \ libhls_TEST_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --ldflags --libs --system-libs) +libhls_VERSION = 0.0.1 +libhls_SOVERSION = 0 $(eval $(call common_library,libhls)) diff --git a/jlm/llvm/Makefile.sub b/jlm/llvm/Makefile.sub index 989759bf7..d3ae799c4 100644 --- a/jlm/llvm/Makefile.sub +++ b/jlm/llvm/Makefile.sub @@ -1,7 +1,7 @@ # Copyright 2019 Nico Reißmann # See COPYING for terms of redistribution. -libllvm_SOURCES = \ +libjlmllvm_SOURCES = \ jlm/llvm/backend/jlm2llvm/instruction.cpp \ jlm/llvm/backend/jlm2llvm/jlm2llvm.cpp \ jlm/llvm/backend/jlm2llvm/type.cpp \ @@ -61,7 +61,7 @@ libllvm_SOURCES = \ jlm/llvm/opt/reduction.cpp \ jlm/llvm/opt/unroll.cpp \ -libllvm_HEADERS = \ +libjlmllvm_HEADERS = \ jlm/llvm/opt/unroll.hpp \ jlm/llvm/opt/DeadNodeElimination.hpp \ jlm/llvm/opt/inlining.hpp \ @@ -124,7 +124,7 @@ libllvm_HEADERS = \ jlm/llvm/backend/jlm2llvm/instruction.hpp \ jlm/llvm/backend/jlm2llvm/context.hpp \ -libllvm_TESTS += \ +libjlmllvm_TESTS += \ tests/jlm/llvm/backend/llvm/r2j/test-empty-gamma \ tests/jlm/llvm/backend/llvm/r2j/test-partial-gamma \ tests/jlm/llvm/backend/llvm/r2j/test-recursive-data \ @@ -180,12 +180,14 @@ libllvm_TESTS += \ tests/jlm/llvm/opt/test-push \ tests/jlm/llvm/opt/test-unroll \ -libllvm_TEST_LIBS = \ +libjlmllvm_TEST_LIBS = \ libjlmtest \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ -libllvm_TEST_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --ldflags --libs --system-libs) +libjlmllvm_TEST_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --ldflags --libs --system-libs) +libjlmllvm_VERSION = 0.0.1 +libjlmllvm_SOVERSION = 0 -$(eval $(call common_library,libllvm)) +$(eval $(call common_library,libjlmllvm)) diff --git a/jlm/llvm/ir/operators/operators.hpp b/jlm/llvm/ir/operators/operators.hpp index e4594e328..aa4247b51 100644 --- a/jlm/llvm/ir/operators/operators.hpp +++ b/jlm/llvm/ir/operators/operators.hpp @@ -2680,7 +2680,7 @@ class Memcpy final : public jlm::rvsdg::simple_op }; /* - FIXME: This function should be in librvsdg and not in libllvm. + FIXME: This function should be in librvsdg and not in libjlmllvm. */ static inline jlm::rvsdg::node * input_node(const jlm::rvsdg::input * input) diff --git a/jlm/mlir/Makefile.sub b/jlm/mlir/Makefile.sub index 7dda68b3c..c803df5c5 100644 --- a/jlm/mlir/Makefile.sub +++ b/jlm/mlir/Makefile.sub @@ -15,9 +15,9 @@ libmlir_TESTS += \ libmlir_TEST_LIBS += \ libmlir \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ libjlmtest \ libmlir_TEST_EXTRA_LDFLAGS = \ @@ -27,4 +27,7 @@ libmlir_TEST_EXTRA_LDFLAGS = \ -lMLIRJLM \ -lMLIRRVSDG \ +libmlir_VERSION = 0.0.1 +libmlir_SOVERSION = 0 + $(eval $(call common_library,libmlir)) diff --git a/jlm/rvsdg/Makefile.sub b/jlm/rvsdg/Makefile.sub index fa95ea5f5..811744108 100644 --- a/jlm/rvsdg/Makefile.sub +++ b/jlm/rvsdg/Makefile.sub @@ -82,6 +82,11 @@ librvsdg_TESTS = \ librvsdg_TEST_LIBS = \ libjlmtest \ librvsdg \ - libutil \ + libjlmutil \ + +librvsdg_VERSION = 0.0.1 +librvsdg_SOVERSION = 0 $(eval $(call common_library,librvsdg)) + +PKGCONFIG_FILES += $(BUILD_OUT_PREFIX)jlm/rvsdg/librvsdg.pc diff --git a/jlm/rvsdg/librvsdg.pc.in b/jlm/rvsdg/librvsdg.pc.in new file mode 100644 index 000000000..a46b0f22a --- /dev/null +++ b/jlm/rvsdg/librvsdg.pc.in @@ -0,0 +1,10 @@ +libdir = @libdir@ +includedir = @includedir@ + +Name: librvsdg +Description: rvsdg representation library +Version: 0.0.1 +URL: https://github.com/phate/jlm +Libs: -L${libdir} -lrvsdg +Requires: libjlmutil +Cflags: -I${includedir} diff --git a/jlm/tooling/Makefile.sub b/jlm/tooling/Makefile.sub index 3ccd9bc42..e255041e1 100644 --- a/jlm/tooling/Makefile.sub +++ b/jlm/tooling/Makefile.sub @@ -56,11 +56,14 @@ libtooling_TESTS = \ libtooling_TEST_LIBS = \ libtooling \ libhls \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ libjlmtest \ libtooling_TEST_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --ldflags --libs --system-libs) +libtooling_VERSION = 0.0.1 +libtooling_SOVERSION = 0 + $(eval $(call common_library,libtooling)) diff --git a/jlm/util/Makefile.sub b/jlm/util/Makefile.sub index 285f48a4b..546aa954a 100644 --- a/jlm/util/Makefile.sub +++ b/jlm/util/Makefile.sub @@ -1,9 +1,9 @@ -libutil_SOURCES = \ +libjlmutil_SOURCES = \ jlm/util/callbacks.cpp \ jlm/util/common.cpp \ jlm/util/Statistics.cpp \ -libutil_TESTS += \ +libjlmutil_TESTS += \ tests/jlm/util/test-disjointset \ tests/jlm/util/test-intrusive-hash \ tests/jlm/util/test-intrusive-list \ @@ -13,12 +13,32 @@ libutil_TESTS += \ tests/jlm/util/TestMath \ tests/jlm/util/TestStatistics \ -libutil_TEST_LIBS = \ +libjlmutil_HEADERS += \ + jlm/util/BijectiveMap.hpp\ + jlm/util/HashSet.hpp\ + jlm/util/Math.hpp\ + jlm/util/Statistics.hpp \ + jlm/util/callbacks.hpp \ + jlm/util/common.hpp\ + jlm/util/disjointset.hpp \ + jlm/util/file.hpp\ + jlm/util/intrusive-hash.hpp \ + jlm/util/intrusive-list.hpp\ + jlm/util/iterator_range.hpp\ + jlm/util/strfmt.hpp\ + jlm/util/time.hpp\ + +libjlmutil_TEST_LIBS = \ libjlmtest \ - libutil \ + libjlmutil \ # Not fully clear why this is required, but omitting this causes # linker errors. -libutil_TEST_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --ldflags --libs --system-libs) +libjlmutil_TEST_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --ldflags --libs --system-libs) + +libjlmutil_VERSION = 0.0.1 +libjlmutil_SOVERSION = 0 + +$(eval $(call common_library,libjlmutil)) -$(eval $(call common_library,libutil)) +PKGCONFIG_FILES += $(BUILD_OUT_PREFIX)jlm/util/libjlmutil.pc diff --git a/jlm/util/libjlmutil.pc.in b/jlm/util/libjlmutil.pc.in new file mode 100644 index 000000000..024723a19 --- /dev/null +++ b/jlm/util/libjlmutil.pc.in @@ -0,0 +1,9 @@ +libdir = @libdir@ +includedir = @includedir@ + +Name: libjlmutil +Description: jlm common utilities library +Version: 0.0.1 +URL: https://github.com/phate/jlm +Libs: -L${libdir} -ljlmutil +Cflags: -I${includedir} diff --git a/tests/Makefile.sub b/tests/Makefile.sub index 972c93049..28f5c7eda 100644 --- a/tests/Makefile.sub +++ b/tests/Makefile.sub @@ -5,6 +5,9 @@ libjlmtest_SOURCES = \ tests/test-types.cpp \ tests/TestRvsdgs.cpp \ +libjlmtest_VERSION = 0.0.1 +libjlmtest_SOVERSION = 0 + $(eval $(call common_library,libjlmtest)) ################################################################################ diff --git a/tools/Makefile.sub b/tools/Makefile.sub index f845f453e..5755be944 100644 --- a/tools/Makefile.sub +++ b/tools/Makefile.sub @@ -7,9 +7,9 @@ jlc_SOURCES = \ jlc_LIBS += \ libtooling \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ jlc_EXTRA_LDFLAGS += $(shell $(LLVMCONFIG) --libs core irReader) $(shell $(LLVMCONFIG) --ldflags) $(shell $(LLVMCONFIG) --system-libs) @@ -20,9 +20,9 @@ jlm-opt_SOURCES = \ jlm-opt_LIBS = \ libtooling \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ jlm-opt_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --libs core irReader) $(shell $(LLVMCONFIG) --ldflags) $(shell $(LLVMCONFIG) --system-libs) diff --git a/tools/jhls/Makefile.sub b/tools/jhls/Makefile.sub index be01c748b..9aac94d47 100644 --- a/tools/jhls/Makefile.sub +++ b/tools/jhls/Makefile.sub @@ -8,9 +8,9 @@ jhls_SOURCES = \ jhls_LIBS = \ libtooling \ libhls \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ jhls_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --libs core irReader) $(shell $(LLVMCONFIG) --ldflags) \ diff --git a/tools/jlm-hls/Makefile.sub b/tools/jlm-hls/Makefile.sub index 9141e1948..b6d2526b5 100644 --- a/tools/jlm-hls/Makefile.sub +++ b/tools/jlm-hls/Makefile.sub @@ -8,9 +8,9 @@ jlm-hls_SOURCES = \ jlm-hls_LIBS = \ libtooling \ libhls \ - libllvm \ + libjlmllvm \ librvsdg \ - libutil \ + libjlmutil \ jlm-hls_EXTRA_LDFLAGS = $(shell $(LLVMCONFIG) --libs core irReader) $(shell $(LLVMCONFIG) --ldflags) $(shell $(LLVMCONFIG) --system-libs) From bc32bcfdd20bdf4916d4a88aba9ca99ea3ede5fb Mon Sep 17 00:00:00 2001 From: Helge Bahmann Date: Sun, 4 Feb 2024 17:19:06 +0100 Subject: [PATCH 2/2] debian build rules Add initial version of debian packaging rules. This allows to build the libraries as packaged artifacts, simplifying build distribution and management of dependencies. --- debian/changelog | 5 ++++ debian/compat | 1 + debian/control | 43 +++++++++++++++++++++++++++++++++++ debian/libjlmutil-dev.install | 4 ++++ debian/libjlmutil0.install | 1 + debian/librvsdg-dev.install | 4 ++++ debian/librvsdg0.install | 1 + debian/rules | 14 ++++++++++++ debian/source/format | 1 + debian/source/options | 1 + 10 files changed, 75 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/libjlmutil-dev.install create mode 100644 debian/libjlmutil0.install create mode 100644 debian/librvsdg-dev.install create mode 100644 debian/librvsdg0.install create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/options diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..a2b0c136d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +jlm (0.0.1) UNRELEASED; urgency=medium + + * Initial packaging + + -- Helge Bahmann Sun, 04 Feb 2024 17:20:30 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..f599e28b8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..6c76dcb56 --- /dev/null +++ b/debian/control @@ -0,0 +1,43 @@ +Source: jlm +Priority: optional +Maintainer: Helge Bahmann +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.8 +Section: libs + +Package: libjlmutil-dev +Section: libdevel +Architecture: any +Depends: libjlmutil0 (= ${binary:Version}), ${misc:Depends} +Description: Common utilities for jlm. + Common utilities for jlm. + . + Provides shared utility library for other jlm libraries. + +Package: libjlmutil0 +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Common utilities for jlm. + Common utilities for jlm. + . + Provides shared utility library for other jlm libraries. + +Package: librvsdg-dev +Section: libdevel +Architecture: any +Depends: librvsdg0 (= ${binary:Version}), ${misc:Depends}, libjlmutil-dev +Description: RVSDG compiler IR library. + RVSDG compiler IR library. + . + Library that implements the RVSDG (regionalized value state dependence + graph) compiler intermediate representation. + +Package: librvsdg0 +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: RVSDG compiler IR library. + RVSDG compiler IR library. + . + Library that implements the RVSDG (regionalized value state dependence + graph) compiler intermediate representation. + diff --git a/debian/libjlmutil-dev.install b/debian/libjlmutil-dev.install new file mode 100644 index 000000000..883b0a0a3 --- /dev/null +++ b/debian/libjlmutil-dev.install @@ -0,0 +1,4 @@ +usr/include/jlm/util/* +usr/lib/*/libjlmutil.so +usr/lib/*/libjlmutil.a +usr/lib/*/pkgconfig/libjlmutil.pc diff --git a/debian/libjlmutil0.install b/debian/libjlmutil0.install new file mode 100644 index 000000000..2e2223721 --- /dev/null +++ b/debian/libjlmutil0.install @@ -0,0 +1 @@ +usr/lib/*/libjlmutil.so.0* diff --git a/debian/librvsdg-dev.install b/debian/librvsdg-dev.install new file mode 100644 index 000000000..9df2943d5 --- /dev/null +++ b/debian/librvsdg-dev.install @@ -0,0 +1,4 @@ +usr/include/jlm/rvsdg/* +usr/lib/*/librvsdg.so +usr/lib/*/librvsdg.a +usr/lib/*/pkgconfig/librvsdg.pc diff --git a/debian/librvsdg0.install b/debian/librvsdg0.install new file mode 100644 index 000000000..54bcd9e18 --- /dev/null +++ b/debian/librvsdg0.install @@ -0,0 +1 @@ +usr/lib/*/librvsdg.so.0* diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..cfc0d4031 --- /dev/null +++ b/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +%: + dh $@ + +.PHONY: override_dh_strip override_dh_auto_configure + +override_dh_auto_clean: + rm -rf build build-* docs + +override_dh_auto_configure: + ./configure.sh --enable-shared --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) + +override_dh_strip: + dh_strip --automatic-dbgsym diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..89ae9db8f --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 000000000..2059712f8 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +tar-ignore = ".git/*"