mirror of
https://github.com/daniel-e/tetros.git
synced 2025-04-19 16:38:05 +02:00
Add macOS support
This commit is contained in:
parent
3f539d2e1f
commit
97769b5025
2 changed files with 10 additions and 3 deletions
11
Makefile
11
Makefile
|
@ -1,9 +1,16 @@
|
|||
UNAME := $(shell uname)
|
||||
ifeq ($(UNAME), Darwin)
|
||||
STAT := gstat
|
||||
else
|
||||
STAT := stat
|
||||
endif
|
||||
|
||||
all: tetros.img
|
||||
|
||||
tetros.img: tetros.asm Makefile
|
||||
nasm -d DEBUG -f bin tetros.asm -o tetros.img
|
||||
@echo "size is" `stat -c "%s" tetros.img`
|
||||
@if [ `stat -c "%s" tetros.img` -gt 446 ]; then \
|
||||
@echo "size is" `$(STAT) -c "%s" tetros.img`
|
||||
@if [ `$(STAT) -c "%s" tetros.img` -gt 446 ]; then \
|
||||
bash -c 'echo -e "\e[91mOutput exceeded size of 446 bytes.\e[0m"'; \
|
||||
rm -f tetros.img; exit 1; fi
|
||||
nasm -f bin tetros.asm -o tetros.img
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue