mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-06 15:47:06 +08:00
makefile tidying
This commit is contained in:
parent
6f172509d0
commit
2c1ed2c102
21
Makefile
21
Makefile
@ -7,13 +7,6 @@
|
|||||||
# Print help by default
|
# Print help by default
|
||||||
all: help
|
all: help
|
||||||
|
|
||||||
# We often want one job per core, so try to determine our logical core count.
|
|
||||||
ifeq ($(wildcard /proc),/proc) # Linux
|
|
||||||
JOBS = $(shell cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
|
|
||||||
else # Mac
|
|
||||||
JOBS = $(shell sysctl -n hw.ncpu)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Prefix used for output of docs/changelogs/etc targets for use in webpages.
|
# Prefix used for output of docs/changelogs/etc targets for use in webpages.
|
||||||
DOCPREFIX = "ballisticacore_"
|
DOCPREFIX = "ballisticacore_"
|
||||||
|
|
||||||
@ -47,19 +40,19 @@ prereqs-clean:
|
|||||||
|
|
||||||
# Build all assets for all platforms.
|
# Build all assets for all platforms.
|
||||||
assets:
|
assets:
|
||||||
@cd assets && make -j${JOBS}
|
@cd assets && make -j${CPUS}
|
||||||
|
|
||||||
# Build only assets required for desktop builds (mac, pc, linux).
|
# Build only assets required for desktop builds (mac, pc, linux).
|
||||||
assets-desktop:
|
assets-desktop:
|
||||||
@cd assets && make -j${JOBS} desktop
|
@cd assets && make -j${CPUS} desktop
|
||||||
|
|
||||||
# Build only assets required for ios.
|
# Build only assets required for ios.
|
||||||
assets-ios:
|
assets-ios:
|
||||||
@cd assets && make -j${JOBS} ios
|
@cd assets && make -j${CPUS} ios
|
||||||
|
|
||||||
# Build only assets required for android.
|
# Build only assets required for android.
|
||||||
assets-android:
|
assets-android:
|
||||||
@cd assets && make -j${JOBS} android
|
@cd assets && make -j${CPUS} android
|
||||||
|
|
||||||
# Clean all assets.
|
# Clean all assets.
|
||||||
assets-clean:
|
assets-clean:
|
||||||
@ -67,7 +60,7 @@ assets-clean:
|
|||||||
|
|
||||||
# Build resources.
|
# Build resources.
|
||||||
resources: resources/Makefile
|
resources: resources/Makefile
|
||||||
@cd resources && make -j${JOBS} resources
|
@cd resources && make -j${CPUS} resources
|
||||||
|
|
||||||
# Clean resources.
|
# Clean resources.
|
||||||
resources-clean:
|
resources-clean:
|
||||||
@ -75,7 +68,7 @@ resources-clean:
|
|||||||
|
|
||||||
# Build our generated code.
|
# Build our generated code.
|
||||||
code:
|
code:
|
||||||
@cd src/generated_src && make -j${JOBS} generated_code
|
@cd src/generated_src && make -j${CPUS} generated_code
|
||||||
|
|
||||||
# Clean generated code.
|
# Clean generated code.
|
||||||
code-clean:
|
code-clean:
|
||||||
@ -280,6 +273,8 @@ preflightfull2:
|
|||||||
# #
|
# #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# This should give the cpu count on linux and mac; can expand this if need be.
|
||||||
|
CPUS = $(shell getconf _NPROCESSORS_ONLN || echo 4)
|
||||||
ROOT_DIR = ${abspath ${CURDIR}}
|
ROOT_DIR = ${abspath ${CURDIR}}
|
||||||
VERSION = $(shell tools/version_utils version)
|
VERSION = $(shell tools/version_utils version)
|
||||||
BUILD_NUMBER = $(shell tools/version_utils build)
|
BUILD_NUMBER = $(shell tools/version_utils build)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user