-
-
Notifications
You must be signed in to change notification settings - Fork 30
Update cygwin and wsl1 makefiles to use the "Common Linux" scheme from PR#542; Update github workflows to use latest versions of actions #543
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
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c821a73
Updates build environment to Ubuntu Linux 24.04
nbriggs 97b84d4
Add libbsd to ld library search for all makefile-linux* and makefile-…
fghalasz e130b0f
Merge remote-tracking branch 'origin/nhb-linux-build-with-libbsd' int…
fghalasz f4021ef
Move builder image back to 22.04 so that exe's that we build can run …
fghalasz fcbcb2c
Updating all linux makefiles to use the libbsd-overlay scheme properly
fghalasz 41cad3e
Update all makefiles for linux to use (by include) a common base make…
fghalasz dadbef4
Add pkgconf package to things loaded into the Builder Docker image to…
fghalasz 25654fa
For Linux makefiles, automated selection of gcc versus clang compiler…
fghalasz 07e009c
Update github actions to latest versions to account for deprecation o…
fghalasz 3430574
More updates to github actions to account for deprecation of Node 20.
fghalasz c6f3ba4
Including all suggestions made by Gemeni code check. Now includes li…
fghalasz 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
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 |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Common Options for All Linuxes | ||
|
|
||
| include linux-compiler.mk | ||
|
|
||
| BSD_CFLAGS := | ||
| BSD_LDFLAGS := | ||
| ifeq ($(USE_LIBBSD),T) | ||
| # Use LIBBSD - but only if glibc < 2.38 | ||
| # Because we only need strlcat, strlcpy and friends from libbsd | ||
| # and they are included in glibc from 2.38 on. | ||
| GLIBC_VERSION := $(shell ldd --version | head -1 | sed -e "s/^.*\([0-9]\.[0-9][0-9]\)/\\1/") | ||
| GLIBC_CHECK := $(shell echo "$(GLIBC_VERSION) >= 2.38" | bc) | ||
| ifneq ($(GLIBC_CHECK),1) | ||
| include linux-libbsd.mk | ||
| endif | ||
| endif | ||
|
|
||
| ifeq ($(USE_DISPLAY),x) | ||
| include linux-x.mk | ||
| DEFAULT_TARGET := ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex | ||
| endif | ||
| ifeq ($(USE_DISPLAY),sdl) | ||
| include linux-sdl.mk | ||
| DEFAULT_TARGET := ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl | ||
| endif | ||
| ifeq ($(USE_DISPLAY),init) | ||
| include linux-x.mk | ||
| DEFAULT_TARGET := ../$(OSARCHNAME)/ldeinit | ||
| endif | ||
|
|
||
| OPTFLAGS ?= -O2 -g3 | ||
| DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) $(BSD_CFLAGS) $(ADDITIONAL_DFLAGS) | ||
|
|
||
| LDFLAGS = $(XLDFLAGS) -lc -lm $(BSD_LDFLAGS) | ||
|
|
||
| ifeq ($(USE_DISPLAY),x) | ||
| LDELDFLAGS = $(XLDFLAGS) -lc -lm $(BSD_LDFLAGS) | ||
| else | ||
| LDELDFLAGS = -lc -lm $(BSD_LDFLAGS) | ||
| endif | ||
|
|
||
| OBJECTDIR = ../$(RELEASENAME)/ | ||
|
|
||
| default: $(DEFAULT_TARGET) |
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,40 @@ | ||
| # Select whether to use clang or gcc | ||
| # Priority | ||
| # 1. If -DUSE_GCC or -DUSE_CLANG on command line (but not both) use the requested compiler. | ||
| # 2. If one compiler is installed but not the other, use the installed compiler. | ||
| # 3. Use clang | ||
|
|
||
| EXISTS_GCC := $(shell command -v gcc) | ||
| EXISTS_CLANG := $(shell command -v clang) | ||
| ifeq ($(or $(EXISTS_GCC),$(EXISTS_CLANG)),) | ||
| $(error "Cannot find compiler: neither gcc nor clang. Exiting.") | ||
| endif | ||
| ifneq ($(and $(USE_CLANG),$(USE_GCC)),) | ||
| $(error "Cannot use both USE_CLANG=T and USE_GCC=T. Exiting.") | ||
| endif | ||
| COMPILER := | ||
| ifdef USE_CLANG | ||
| ifeq ($(EXISTS_CLANG),) | ||
| $(error "USE_CLANG=T given, but cannot find the clang compiler. Exiting") | ||
| endif | ||
| COMPILER := clang | ||
| endif | ||
| ifdef USE_GCC | ||
| ifeq ($(EXISTS_GCC),) | ||
| $(error "USE_GCC=T given, but cannot find the gcc compiler. Exiting") | ||
| endif | ||
| COMPILER := gcc | ||
| endif | ||
| ifeq ($(COMPILER),) | ||
| ifneq ($(EXISTS_CLANG),) | ||
| COMPILER := clang | ||
| else | ||
| COMPILER := gcc | ||
| endif | ||
| endif | ||
|
|
||
| ifeq ($(COMPILER),gcc) | ||
| CC := gcc $(GCC_CFLAGS) | ||
| else | ||
| CC := clang $(CLANG_CFLAGS) | ||
| endif |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
execute_processcommand uses relative paths like../bin/osversion. This approach is not robust for out-of-source builds, where the build directory is not a direct subdirectory of the source root, and will cause the build to fail in such standard setups. You should use absolute paths constructed withCMAKE_SOURCE_DIRto make the command reliable regardless of the build directory location.