mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
Fix makefile to work on 64 bit macOS, and split up into 32 and 64 bit mac targets
This commit is contained in:
parent
d0d008af48
commit
ff90c8028b
24
src/Makefile
24
src/Makefile
@ -13,6 +13,14 @@ ifndef $(PLAT)
|
|||||||
else
|
else
|
||||||
PLAT=$(shell uname -s | tr '[:upper:]' '[:lower:]')
|
PLAT=$(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PLAT),darwin)
|
||||||
|
ifeq ($(shell uname -m), x86_64)
|
||||||
|
PLAT=mac_x64
|
||||||
|
else
|
||||||
|
PLAT=mac_x32
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLAT),web)
|
ifeq ($(PLAT),web)
|
||||||
@ -40,11 +48,19 @@ CFLAGS=-g -pipe -fno-math-errno
|
|||||||
LIBS=-lm -lsocket -lX11 -lXi -lGL
|
LIBS=-lm -lsocket -lX11 -lXi -lGL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLAT),darwin)
|
ifeq ($(PLAT),mac_x32)
|
||||||
LIBS=
|
LIBS=
|
||||||
|
CFLAGS=-g -m32 -pipe -fno-math-errno
|
||||||
LDFLAGS=-rdynamic -framework Carbon -framework AGL -framework OpenGL -framework IOKit
|
LDFLAGS=-rdynamic -framework Carbon -framework AGL -framework OpenGL -framework IOKit
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PLAT),mac_x64)
|
||||||
|
SOURCES+=interop_cocoa.m
|
||||||
|
CFLAGS=-g -m64 -pipe -fno-math-errno
|
||||||
|
LIBS=
|
||||||
|
LDFLAGS=-rdynamic -framework Cocoa -framework OpenGL -framework IOKit -lobjc
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(PLAT),freebsd)
|
ifeq ($(PLAT),freebsd)
|
||||||
CFLAGS=-g -pipe -I /usr/local/include -fno-math-errno
|
CFLAGS=-g -pipe -I /usr/local/include -fno-math-errno
|
||||||
LDFLAGS=-L /usr/local/lib -rdynamic
|
LDFLAGS=-L /usr/local/lib -rdynamic
|
||||||
@ -89,8 +105,10 @@ mingw:
|
|||||||
$(MAKE) $(ENAME) PLAT=mingw -j$(JOBS)
|
$(MAKE) $(ENAME) PLAT=mingw -j$(JOBS)
|
||||||
sunos:
|
sunos:
|
||||||
$(MAKE) $(ENAME) PLAT=sunos -j$(JOBS)
|
$(MAKE) $(ENAME) PLAT=sunos -j$(JOBS)
|
||||||
darwin:
|
mac_x32:
|
||||||
$(MAKE) $(ENAME) PLAT=darwin -j$(JOBS)
|
$(MAKE) $(ENAME) PLAT=mac_x32 -j$(JOBS)
|
||||||
|
mac_x64:
|
||||||
|
$(MAKE) $(ENAME) PLAT=mac_x64 -j$(JOBS)
|
||||||
freebsd:
|
freebsd:
|
||||||
$(MAKE) $(ENAME) PLAT=freebsd -j$(JOBS)
|
$(MAKE) $(ENAME) PLAT=freebsd -j$(JOBS)
|
||||||
openbsd:
|
openbsd:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user