1 # Copyright 2010, The Native Client SDK Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can
3 # be found in the LICENSE file.
5 # Makefile for the XM Player example.
9 CCFILES = xm_player.cc _mod.cc geturl_handler.cc
13 INCLUDES = -I$(NACL_SDK_ROOT) -I"/cygdrive/h/libs/boost/include/boost-1_47"
14 LDFLAGS = -lppruntime \
22 all: check_variables xm_player.nmf xm_player_dbg.nmf
24 # common.mk has rules to build .o files from .cc files.
27 xm_player.nmf: xm_player_x86_32.nexe xm_player_x86_64.nexe
28 @echo "Creating xm_player.nmf..."
29 $(PYTHON) ../generate_nmf.py --nmf $@ \
30 --x86-64 xm_player_x86_64.nexe --x86-32 xm_player_x86_32.nexe
32 xm_player_dbg.nmf: xm_player_x86_32_dbg.nexe xm_player_x86_64_dbg.nexe
33 @echo "Creating xm_player_dbg.nmf..."
34 $(PYTHON) ../generate_nmf.py --nmf $@ \
35 --x86-64 xm_player_x86_64_dbg.nexe \
36 --x86-32 xm_player_x86_32_dbg.nexe
38 xm_player_x86_32.nexe: $(OBJECTS_X86_32)
39 $(CPP) $^ $(LDFLAGS) -m32 -o $@
40 $(NACL_STRIP) $@ -o $@
42 xm_player_x86_64.nexe: $(OBJECTS_X86_64)
43 $(CPP) $^ $(LDFLAGS) -m64 -o $@
44 $(NACL_STRIP) $@ -o $@
46 xm_player_x86_32_dbg.nexe: $(OBJECTS_X86_32_DBG)
47 $(CPP) $^ $(LDFLAGS) -m32 -o $@
49 xm_player_x86_64_dbg.nexe: $(OBJECTS_X86_64_DBG)
50 $(CPP) $^ $(LDFLAGS) -m64 -o $@
53 -$(RM) *.nmf *.o *.obj *.nexe
55 # This target is used by the SDK build system to produce a pre-built version
56 # of the .nexe. You do not need to call this target.
57 install_prebuilt: xm_player.nmf
58 -$(RM) $(OBJECTS_X86_32) $(OBJECTS_X86_64)