Change soft-fail to use the config, rather than env
[rbx.git] / shotgun / common.mk
blob563f978d67f61bad3162c029308907f93ca4d5a2
1 # Respect the environment
2 ifeq ($(CC),)
3 CC=gcc
4 endif
6 ### Platform stuff
7 UNAME=$(shell uname)
8 CPU=$(shell uname -p)
9 MARCH=$(shell uname -m)
10 OSVER=$(shell uname -r)
12 # amd64 is also known as x86_64
13 ifeq ($(MARCH),x86_64)
14 MARCH=amd64
15 endif
17 WARNINGS = -Wall -Wwrite-strings
18 DEBUG = -g -ggdb3
20 CFLAGS = $(WARNINGS) $(DEBUG)
22 COMP=$(CC)
23 ifeq ($(UNAME),Darwin)
24 LDOPT=-dynamiclib -undefined dynamic_lookup
25 LINKER=$(CC) $(LDOPT)
26 SUFFIX=dylib
27 BIN_RPATH=
28 BIN_RPATHLOCAL=
29 SONAME=-current_version $(VERSION) -compatibility_version $(VERSION) -install_name $(PREFIX)/lib/librubinius-$(VERSION).$(SUFFIX)
30 SONAMELOCAL=-current_version $(VERSION) -compatibility_version $(VERSION) -install_name `pwd`/librubinius-local-dev.$(SUFFIX)
31 ifeq ($(CPU),powerpc)
32 ifeq ($(OSVER),9.1.0)
33 MACOSX_DEPLOYMENT_TARGET=10.5
34 else
35 MACOSX_DEPLOYMENT_TARGET=10.4
36 endif
37 endif
38 else
39 LDOPT=-shared
40 LINKER=$(CC) -shared
41 BIN_RPATH=-Wl,-rpath -Wl,/usr/local/lib
42 BIN_RPATHLOCAL=-Wl,-rpath -Wl,`pwd`/lib
43 SUFFIX=so
44 SONAME=-Wl,-soname,librubinius-$(VERSION).$(SUFFIX)
45 SONAMELOCAL=-Wl,-soname,librubinius-local-dev.$(SUFFIX)
46 endif
48 ifndef VERBOSE
49 COMP=@echo CC $@;$(CC)
50 LINKER=@echo LINK $@;$(CC) $(LDOPT)
51 endif
53 RBXLIB=librubinius-$(VERSION).$(SUFFIX)
54 RBXLIBLOCAL=librubinius-local-dev.$(SUFFIX)