mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 02:25:32 -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
|
||||
PLAT=$(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT),darwin)
|
||||
ifeq ($(shell uname -m), x86_64)
|
||||
PLAT=mac_x64
|
||||
else
|
||||
PLAT=mac_x32
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT),web)
|
||||
@ -40,11 +48,19 @@ CFLAGS=-g -pipe -fno-math-errno
|
||||
LIBS=-lm -lsocket -lX11 -lXi -lGL
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT),darwin)
|
||||
ifeq ($(PLAT),mac_x32)
|
||||
LIBS=
|
||||
CFLAGS=-g -m32 -pipe -fno-math-errno
|
||||
LDFLAGS=-rdynamic -framework Carbon -framework AGL -framework OpenGL -framework IOKit
|
||||
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)
|
||||
CFLAGS=-g -pipe -I /usr/local/include -fno-math-errno
|
||||
LDFLAGS=-L /usr/local/lib -rdynamic
|
||||
@ -89,8 +105,10 @@ mingw:
|
||||
$(MAKE) $(ENAME) PLAT=mingw -j$(JOBS)
|
||||
sunos:
|
||||
$(MAKE) $(ENAME) PLAT=sunos -j$(JOBS)
|
||||
darwin:
|
||||
$(MAKE) $(ENAME) PLAT=darwin -j$(JOBS)
|
||||
mac_x32:
|
||||
$(MAKE) $(ENAME) PLAT=mac_x32 -j$(JOBS)
|
||||
mac_x64:
|
||||
$(MAKE) $(ENAME) PLAT=mac_x64 -j$(JOBS)
|
||||
freebsd:
|
||||
$(MAKE) $(ENAME) PLAT=freebsd -j$(JOBS)
|
||||
openbsd:
|
||||
|
Loading…
x
Reference in New Issue
Block a user