-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (26 loc) · 1.98 KB
/
Makefile
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
NACL_FINALIZE=$(NACL_SDK_ROOT)/toolchain/linux_pnacl/bin/pnacl-finalize
NACL_TRANSLATE=$(NACL_SDK_ROOT)/toolchain/linux_pnacl/bin/pnacl-translate
NACL_COMPRESS=$(NACL_SDK_ROOT)/toolchain/linux_pnacl/bin/pnacl-compress
CXX=$(NACL_SDK_ROOT)/toolchain/linux_pnacl/bin/pnacl-clang++
CXXINCLUDE=-I $(NACL_SDK_ROOT)/include/pnacl -I $(NACL_SDK_ROOT)/include -I $(DJVULIBRE_ROOT) -I $(DJVULIBRE_ROOT)/libdjvu -I $(DDJVU_ROOT)/src
CXXFLAGS=-std=gnu++11 $(CXXINCLUDE)
LDFLAGS=-L $(NACL_SDK_ROOT)/lib/pnacl/Release/ -L $(DJVULIBRE_ROOT)/libdjvu/.libs
LIBS=-l ppapi_cpp -l ppapi -l pthread -l djvulibre -l png -l z
CXXCPPOLD=-D THREADMODEL=POSIXTHREADS -D HAVE_STDINT_H -D UPDATE_EXPORTS -D HAVE_NAMESPACES -D AUTOCONF -D HAVE_STDINCLUDES
CXXCPP=-D HAVE_CONFIG_H -D THREADMODEL=POSIXTHREADS -D NDEBUG
DECODER_SOURCES=src/cpp/decoder/module.cc src/cpp/loader/url_download_stream.cc src/cpp/loader/url_loader_handler.cc src/cpp/decoder/decoder.cc src/cpp/base64/base64.cc
all: decoder-compress
debug: decoder-debug
decoder-compress: decoder-final
$(NACL_COMPRESS) graphics-nacl-decoder.final.pexe -o graphics-nacl-decoder.release.pexe
decoder-final: graphics-nacl-decoder
$(NACL_FINALIZE) graphics-nacl-decoder.pexe -o graphics-nacl-decoder.final.pexe
graphics-nacl-decoder:
$(CXX) -O2 $(DECODER_SOURCES) $(CXXCPP) $(CXXFLAGS) $(LDFLAGS) $(LIBS) -o graphics-nacl-decoder.pexe
decoder-debug: graphics-nacl-debug
$(NACL_TRANSLATE) --allow-llvm-bitcode-input graphics-nacl-decoder-debug.pexe -arch x86-32 -o graphics-nacl-decoder-debug_x86_32.nexe
$(NACL_TRANSLATE) --allow-llvm-bitcode-input graphics-nacl-decoder-debug.pexe -arch x86-64 -o graphics-nacl-decoder-debug_x86_64.nexe
graphics-nacl-debug:
$(CXX) $(DECODER_SOURCES) $(CXXCPP) $(CXXFLAGS) $(LDFLAGS) $(LIBS) -g -o graphics-nacl-decoder-debug.pexe
clean:
rm -rf graphics-nacl-decoder.pexe graphics-nacl-decoder.final.pexe graphics-nacl-decoder-debug.pexe graphics-nacl-decoder-debug_x86_32.nexe graphics-nacl-decoder-debug_x86_64.nexe graphics-nacl-decoder-debug.bc