Fix to build on FreeBSD
This commit is contained in:
parent
de0005d5ee
commit
806325d649
19
Makefile
19
Makefile
@ -2,6 +2,11 @@ OS=$(shell uname | tr [:upper:] [:lower:])
|
|||||||
HOST_ENV=${OS}-$(shell uname -m)
|
HOST_ENV=${OS}-$(shell uname -m)
|
||||||
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
|
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
|
||||||
DEVENV_IMAGE=nostalgia-devenv
|
DEVENV_IMAGE=nostalgia-devenv
|
||||||
|
ifneq ($(shell which gmake),)
|
||||||
|
MAKE=gmake
|
||||||
|
else
|
||||||
|
MAKE=make
|
||||||
|
endif
|
||||||
ifneq ($(shell which docker),)
|
ifneq ($(shell which docker),)
|
||||||
ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running)
|
ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running)
|
||||||
ENV_RUN=docker exec -i -t --user $(shell id -u ${USER}) ${DEVENV}
|
ENV_RUN=docker exec -i -t --user $(shell id -u ${USER}) ${DEVENV}
|
||||||
@ -9,21 +14,21 @@ ifneq ($(shell which docker),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
make:
|
make:
|
||||||
${ENV_RUN} make -j -C build HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV}
|
||||||
build_rom:
|
build_rom:
|
||||||
${ENV_RUN} make -j -C build ARGS="install" HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build ARGS="install" HOST_ENV=${HOST_ENV}
|
||||||
${ENV_RUN} make -j -C build HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV}
|
||||||
${ENV_RUN} ./scripts/build_rom.sh
|
${ENV_RUN} ./scripts/build_rom.sh
|
||||||
preinstall:
|
preinstall:
|
||||||
${ENV_RUN} make -j -C build ARGS="preinstall" HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build ARGS="preinstall" HOST_ENV=${HOST_ENV}
|
||||||
install:
|
install:
|
||||||
${ENV_RUN} make -j -C build ARGS="install" HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build ARGS="install" HOST_ENV=${HOST_ENV}
|
||||||
clean:
|
clean:
|
||||||
${ENV_RUN} make -j -C build ARGS="clean" HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build ARGS="clean" HOST_ENV=${HOST_ENV}
|
||||||
purge:
|
purge:
|
||||||
${ENV_RUN} rm -rf $$(find build -mindepth 1 -maxdepth 1 -type d) dist
|
${ENV_RUN} rm -rf $$(find build -mindepth 1 -maxdepth 1 -type d) dist
|
||||||
test:
|
test:
|
||||||
${ENV_RUN} make -j -C build ARGS="test" HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build ARGS="test" HOST_ENV=${HOST_ENV}
|
||||||
|
|
||||||
run: install
|
run: install
|
||||||
./dist/current/bin/nostalgia -debug
|
./dist/current/bin/nostalgia -debug
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
all: gba_build gba_debug_build native_build native_debug_build windows_release windows_debug
|
all: gba_build gba_debug_build native_build native_debug_build windows_release windows_debug
|
||||||
|
|
||||||
MAKE=make -j
|
ifneq ($(shell which gmake),)
|
||||||
|
MAKE="gmake -j"
|
||||||
|
else
|
||||||
|
MAKE="make -j"
|
||||||
|
endif
|
||||||
|
|
||||||
gba_build:
|
gba_build:
|
||||||
@if [ -d gba-release ]; then \
|
@if [ -d gba-release ]; then \
|
||||||
|
Loading…
Reference in New Issue
Block a user