bullock/Makefile

86 lines
2.0 KiB
Makefile
Raw Normal View History

2018-10-14 19:07:06 -05:00
OS=$(shell uname | tr [:upper:] [:lower:])
HOST_ENV=${OS}-$(shell uname -m)
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
DEVENV_IMAGE=bullock-devenv
ifneq ($(shell which gmake 2> /dev/null),)
MAKE=gmake -s
else
MAKE=make -s
endif
ifneq ($(shell which docker 2> /dev/null),)
ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running)
ENV_RUN=docker exec -i -t --user $(shell id -u ${USER}) ${DEVENV}
endif
endif
make:
${ENV_RUN} ./scripts/run-make build
gba-pkg:
${ENV_RUN} ./scripts/run-make build install
${ENV_RUN} ./scripts/run-make build
${ENV_RUN} ./scripts/gba-pkg
preinstall:
${ENV_RUN} ./scripts/run-make build preinstall
install:
${ENV_RUN} ./scripts/run-make build install
clean:
${ENV_RUN} ./scripts/run-make build clean
purge:
${ENV_RUN} rm -rf build
test:
${ENV_RUN} ./scripts/run-make build test
run: install
./dist/current/bin/bullock
gdb: install
gdb --args ./dist/current/bin/bullock
2018-10-14 19:07:06 -05:00
devenv-image:
docker build . -t ${DEVENV_IMAGE}
devenv-create:
docker run -d \
-e LOCAL_USER_ID=$(shell id -u ${USER}) \
-e DISPLAY=$(DISPLAY) \
-e QT_AUTO_SCREEN_SCALE_FACTOR=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /run/dbus/:/run/dbus/ \
-v $(shell pwd):/usr/src/project \
-v /dev/shm:/dev/shm \
--restart=always \
--name ${DEVENV} \
-t ${DEVENV_IMAGE} bash
devenv-destroy:
docker rm -f ${DEVENV}
shell:
${ENV_RUN} bash
release:
${ENV_RUN} rm -rf build/${HOST_ENV}-release
2019-02-22 19:32:20 -06:00
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} release
2018-10-14 19:07:06 -05:00
debug:
${ENV_RUN} rm -rf build/${HOST_ENV}-debug
2019-02-22 19:32:20 -06:00
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} debug
2018-10-14 19:07:06 -05:00
asan:
${ENV_RUN} rm -rf build/${HOST_ENV}-asan
2019-02-22 19:32:20 -06:00
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} asan
2018-10-14 19:07:06 -05:00
windows:
${ENV_RUN} rm -rf build/windows
2019-02-22 19:32:20 -06:00
${ENV_RUN} ./scripts/setup-build windows
2018-10-14 19:07:06 -05:00
windows-debug:
${ENV_RUN} rm -rf build/windows
2019-02-22 19:32:20 -06:00
${ENV_RUN} ./scripts/setup-build windows debug
2018-10-14 19:07:06 -05:00
gba:
${ENV_RUN} rm -rf build/gba-release
2019-02-22 19:32:20 -06:00
${ENV_RUN} ./scripts/setup-build gba release
2018-10-14 19:07:06 -05:00
gba-debug:
${ENV_RUN} rm -rf build/gba-debug
2019-02-22 19:32:20 -06:00
${ENV_RUN} ./scripts/setup-build gba debug