-
Notifications
You must be signed in to change notification settings - Fork 112
Sapporo2 build system integration #1262
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
Open
LourensVeen
wants to merge
12
commits into
amusecode:main
Choose a base branch
from
LourensVeen:sapporo2_build_system_integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
631082a
Add Sapporo2 to the build system
LourensVeen 4139a17
Fix sapporo_light autoconf package name
LourensVeen 039123b
Fix sapporo_2 make clean if no source is present
LourensVeen a41cc80
Don't include Sapporo2 into default AMUSE libs
LourensVeen 5102eca
Merge branch 'main' into sapporo2_build_system_integration
HannoSpreeuw 65164fa
Update version hash to current Sapporo 2
HannoSpreeuw 15deb37
Merge branch 'main' into sapporo2_build_system_integration
HannoSpreeuw 4b16c44
Update to Sapporo2 with get_nj_max()
LourensVeen ba74f25
Add amuse-ph4-sapporo2 package
LourensVeen 384dbca
Fix ./setup test sapporo2
LourensVeen 4472771
Sapporo Light will be deprecated.
HannoSpreeuw 3a6ca20
Remove amuse-ph4-sapporo package in favour of amuse-ph4-sapporo2
LourensVeen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,10 +1,92 @@ | ||
| .PHONY: Makefile install uninstall | ||
| install uninstall: | ||
| @echo Sapporo2 is disabled for the moment, please let us know if you need it. | ||
| .PHONY: Makefile support/shared/lib-configure.mk | ||
| include support/shared/lib-configure.mk | ||
|
|
||
| .PHONY: | ||
|
|
||
| # Main targets | ||
| .PHONY: all | ||
| all: sapporo2 | ||
|
|
||
| .DEFAULT_GOAL := all | ||
|
|
||
| VERSION := eeac0835f80d6e0e8ca778bdea4dbf3ae799ca29 | ||
|
|
||
|
|
||
| # Install into an active venv or Conda env if no location is specified | ||
| ifdef VIRTUAL_ENV | ||
| PREFIX ?= $(VIRTUAL_ENV) | ||
| endif | ||
|
|
||
| ifdef CONDA_PREFIX | ||
| PREFIX ?= $(CONDA_PREFIX) | ||
| endif | ||
|
|
||
| ifndef PREFIX | ||
| ifeq ($(filter-out %install, $(MAKECMDGOALS)),) | ||
| $(error PREFIX is not set and no virtualenv or Conda env is active) | ||
| endif | ||
| endif | ||
|
|
||
|
|
||
| SRCDIR := src/sapporo2-$(VERSION) | ||
|
|
||
| sapporo2-$(VERSION).tar.gz: | ||
| $(DOWNLOAD) https://github.com/treecode/sapporo2/archive/$(VERSION).tar.gz >$@ | ||
|
|
||
| src: | ||
| mkdir -p $@ | ||
|
|
||
| $(SRCDIR): sapporo2-$(VERSION).tar.gz | src | ||
| $(TAR) xzf $< | ||
| mv sapporo2-$(VERSION) src/ | ||
|
|
||
|
|
||
| .PHONY: sapporo2 | ||
| sapporo2: | $(SRCDIR) | ||
| $(MAKE) -C $(SRCDIR) all PREFIX=$(PREFIX) | ||
|
|
||
|
|
||
| PKG_CONFIG_FILE := sapporo2.pc | ||
|
|
||
| define PKG_CONFIG_CONTENTS := | ||
| prefix=$(PREFIX) | ||
| includedir=$${prefix}/include | ||
| libdir=$${prefix}/lib | ||
|
|
||
| Name: sapporo2 | ||
| Description: The sapporo2 library | ||
| Version: $(VERSION) | ||
| Cflags: -I$${includedir} | ||
| Libs: -L$${libdir} -lsapporo2 | ||
|
|
||
| endef | ||
|
|
||
| $(PKG_CONFIG_FILE): | ||
| # the file function is not available on old macOS make, so we make do with this | ||
| printf '' >$@ | ||
| $(foreach line,$(PKG_CONFIG_CONTENTS),printf '%s\n' '$(line)' >>$@;) | ||
|
|
||
|
|
||
|
|
||
| # Note that the pkg-config files get built at install time, because PREFIX | ||
| # ends up inside of them, and it may not be defined when make all is called. | ||
| .PHONY: install | ||
| install: all $(PKG_CONFIG_FILE) | ||
| $(MAKE) -C $(SRCDIR) install PREFIX=$(PREFIX) | ||
| install -m 644 $(PKG_CONFIG_FILE) $(PREFIX)/lib/pkgconfig | ||
|
|
||
|
|
||
| .PHONY: uninstall | ||
| uninstall: | ||
| $(MAKE) -C $(SRCDIR) uninstall PREFIX=$(PREFIX) | ||
| rm -f $(PREFIX)/lib/pkgconfig/$(PKG_CONFIG_FILE) | ||
|
|
||
|
|
||
| .PHONY: clean | ||
| clean: | ||
| $(MAKE) -C $(SRCDIR) clean | ||
| rm -f support/config.mk support/config.log support/config.status | ||
|
|
||
| .PHONY: | ||
| distclean: | ||
| .PHONY: distclean | ||
| distclean: clean | ||
| rm -rf support/autom4te.cache support/configure~ | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,6 @@ | ||
| configure~ | ||
| autom4te.cache | ||
| config.mk | ||
| config.log | ||
| config.status | ||
|
|
This file contains hidden or 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,18 @@ | ||
| # generated automatically by aclocal 1.16.5 -*- Autoconf -*- | ||
|
|
||
| # Copyright (C) 1996-2021 Free Software Foundation, Inc. | ||
|
|
||
| # This file is free software; the Free Software Foundation | ||
| # gives unlimited permission to copy and/or distribute it, | ||
| # with or without modifications, as long as this notice is preserved. | ||
|
|
||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
| # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
| # PARTICULAR PURPOSE. | ||
|
|
||
| m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | ||
| m4_include([shared/m4/amuse_cuda.m4]) | ||
| m4_include([shared/m4/amuse_detect_os.m4]) | ||
| m4_include([shared/m4/amuse_download.m4]) | ||
| m4_include([shared/m4/amuse_log_envvars.m4]) |
This file contains hidden or 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,17 @@ | ||
| AMUSE_ON_MACOS = @AMUSE_ON_MACOS@ | ||
|
|
||
| DOWNLOAD = @DOWNLOAD@ | ||
| TAR = @TAR@ | ||
|
|
||
| CC = @CC@ | ||
| CXX = @CXX@ | ||
|
|
||
| AR = @AR@ | ||
| RANLIB = @RANLIB@ | ||
| INSTALL = @INSTALL@ | ||
|
|
||
| CUDA_TK = @CUDA_TK@ | ||
| NVCC = @NVCC@ | ||
| CUDA_FLAGS = @CUDA_FLAGS@ | ||
| CUDA_LDFLAGS = @CUDA_LDFLAGS@ | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.