Skip to content

Commit

Permalink
Move makefile detection of top level folder
Browse files Browse the repository at this point in the history
The `TopLevelFolder` is only used when running or building Docker images.
  • Loading branch information
DanRStevens committed Jul 16, 2024
1 parent 4c19604 commit 6a2484c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 6 additions & 1 deletion docker/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Build rules relating to Docker images

DockerFolder := ${TopLevelFolder}/docker
# Capture top level folder before any Makefile includes
# Note: MAKEFILE_LIST's last entry is the last processed Makefile.
# That should be the current Makefile, assuming no includes
DockerFolder := $(abspath $(dir $(lastword ${MAKEFILE_LIST})))
TopLevelFolder := $(abspath $(DockerFolder)/..)

DockerRunFlags := --volume ${TopLevelFolder}:/code --workdir=/code --rm --tty
DockerUserFlags = --user="$(shell id --user):$(shell id --group)"
DockerRepository := outpostuniverse
Expand Down
5 changes: 0 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Source http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/

# Capture top level folder before any Makefile includes
# Note: MAKEFILE_LIST's last entry is the last processed Makefile.
# That should be the current Makefile, assuming no includes
TopLevelFolder := $(abspath $(dir $(lastword ${MAKEFILE_LIST})))

CONFIG = Debug
Debug_CXX_FLAGS := -Og -g
Release_CXX_FLAGS := -O3
Expand Down

0 comments on commit 6a2484c

Please sign in to comment.