DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (e67641c2e4cc)

VCS Links

Line Code
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# We keep the Makefile until the mortar is integrated into gecko build system.
ifeq ($(shell uname), Darwin)
	DLL_SUFFIX = .dylib
	CXX = g++
	CXX_FLAGS = -std=c++11 -g -fPIC
	LD_FLAGS = -dynamiclib
ifdef DEBUG
	CXX_FLAGS += -DDEBUG
endif
else ifeq ($(shell uname), Linux)
	DLL_SUFFIX = .so
	CXX = g++
	CXX_FLAGS = -std=c++11 -g -fPIC
	LD_FLAGS = -shared
ifdef DEBUG
	CXX_FLAGS += -DDEBUG
endif
else
	DLL_SUFFIX = .dll
	CXX = cl
	CXX_FLAGS = -nologo -EHsc -Oy-
ifdef DEBUG
	CXX_FLAGS += -LDd -DDEBUG -Od
else
	CXX_FLAGS += -LD
endif
	LD_FLAGS = -link -dll
endif

all : ppapi/out/rpc$(DLL_SUFFIX) ppapi/out/interpose$(DLL_SUFFIX)

ppapi/out/rpc$(DLL_SUFFIX): ppapi/out/rpc.cc host/rpc.h host/rpc.cc
	$(CXX) $(CXX_FLAGS) -I. -o $@ host/rpc.cc $(LD_FLAGS)

ppapi/out/interpose$(DLL_SUFFIX): ppapi/out/rpc.cc host/rpc.h host/interpose.cc
	$(CXX) -DINTERPOSE $(CXX_FLAGS) -I. -o $@ host/interpose.cc $(LD_FLAGS)

ppapi/out/rpc.cc: $(shell find . -name *.idl) $(shell find . -name *.py)
	cd ppapi/generators; python idl_gen_rpc.py --out ../out/rpc.cc ; cd ../..

json/test: json/json.cpp json/json.h json/test.cpp
	$(CXX) -I./json -o $@ json/test.cpp

test-json: json/test
	@./json/test && echo "OK"

clean:
	rm -rf ppapi/generators/*.pyc ppapi/generators/*~ *~ ppapi/out/* json/*~ json/test *.obj

.PHONY: all test-json test clean