summaryrefslogtreecommitdiff
path: root/binary/config.mk
blob: e7ae2e1d9881c101f64b56f48e5f37b5184c1ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

GECKO_MAJOR ?= 10
GECKO_MINOR ?= 0
ABI_OS        := $(shell uname -s)
ABI_ARCH      := $(shell uname -m)
ABI_COMPILER  := gcc3
ABI_PLATFORM  ?= $(ABI_OS)_$(ABI_ARCH)-$(ABI_COMPILER)
ABI           ?= $(GECKO_MAJOR).$(GECKO_MINOR)-$(ABI_PLATFORM)
DEFINES        = -DGECKO_MAJOR=$(GECKO_MAJOR) -DGECKO_MINOR=$(GECKO_MINOR)

LIBEXT	      ?= so

SED := $(shell if [ "xoo" = x$$(echo foo | sed -E 's/f(o)/\1/' 2>/dev/null) ];	\
	       then echo sed -E; else echo sed -r;				\
	       fi)


PKGCONFIG      ?= pkg-config
GECKO_SDK_PATH := $(shell $(PKGCONFIG) --libs libxul | $(SED) 's,([^-]|-[^L])*-L([^ ]+)/lib.*,\2,')

CXX      ?= c++
CPP       = $(CXX) -o
LINK     ?= c++

MKDEP    ?= $(CXX) -M

PYTHON   ?= python2

EXCPPFLAGS =    -fno-rtti		\
                -fno-exceptions		\
                -fshort-wchar		\
		-fPIC			\
		-Os			\
		$(NULL)

XPIDL   ?= $(PYTHON) $(GECKO_SDK_PATH)/sdk/bin
IDL_H   ?= $(XPIDL)/header.py -o
IDL_XPT ?= $(XPIDL)/typelib.py -o