Don't delete or unpack binutils and gcc: we get them from Git
[nativeclient.git] / include / makeconfig
blob93d0497d064109170275b45be10c1e016f7cb919
1 UNAME:=$(shell uname)
4 # TODO: include paths appear relative to the intial Makefile?
5 # This is awkward.  This 'dual silent-failure include' helps us work
6 # from several directories (e.g. from within both
7 # naive_client/service_runtime and
8 # naive_client/service_runtime/{linux,osx}.)
9 # The PLATFORM check below makes sure one worked.  
10 ifeq ($(UNAME), Darwin)
11  -include ../include/osx/makeconfig
12  -include ../../include/osx/makeconfig
13 else
14 ifeq ($(UNAME), Linux)
15  -include ../include/linux/makeconfig
16  -include ../../include/linux/makeconfig
17 else
18  include does_not_exist
19 endif
20 endif
22 # Make sure one of those includes worked
23 ifeq ($(PLATFORM), )
24  include there_is_an_include_file_problem
25 endif
27
28 # Common between OSX and Linux
31 NACL_BASE:=$(shell pwd | sed 's,/native_client/.*,,')
33 OBJ_SFX=o
34 OBJ_SUFFIX=.o
35 LIB_SUFFIX=.a
36 LIB_COMMAND=ar
37 LIB_FLAGS=crs
38 DLL_SUFFIX=.so
39 DLL_FLAGS=-shared
40 DLL_COMMAND=$(CC)
41 LIBE_TARGET=
42 PREPROCESSOR_FLAG=-E
43 EXE_SUFFIX=
44 LOCAL_PATH=./
46 CC=gcc
47 #TODO - put back -Wswitch-enum once gUnit can compile with it
48 # CFLAGS=-fPIC -malign-double -Werror -Wall -g $(OSFLAGS)
49 # it is no longer globally necessary to generate PIC code, RIGHT?!?!?
50 CFLAGS+=-malign-double -Werror -Wall -g -I$(NACL_BASE) $(OSFLAGS)
51 #-O3
52 CXXFLAGS=$(CFLAGS)
54 CLEAN_COMMAND=rm -f 
55 PLATFORM_TEMP_FILES=*.nexe *.i