1 #*************************************************************************
3 # The Contents of this file are made available subject to the terms of
6 # Copyright 2000, 2010 Oracle and/or its affiliates.
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in the
16 # documentation and/or other materials provided with the distribution.
17 # 3. Neither the name of Sun Microsystems, Inc. nor the names of its
18 # contributors may be used to endorse or promote products derived
19 # from this software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
30 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
31 # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #**************************************************************************
35 # Builds the SimpleBootstrap_cpp example of the SDK.
38 SETTINGS
=$(PRJ
)/settings
40 include $(SETTINGS
)/settings.mk
41 include $(SETTINGS
)/std.mk
43 # Define non-platform/compiler specific settings
44 APP_NAME
=SimpleBootstrap_cpp
46 OUT_APP_INC
= $(OUT_INC
)/$(APP_NAME
)
47 OUT_APP_GEN
= $(OUT_MISC
)/$(APP_NAME
)
48 OUT_APP_OBJ
=$(OUT_OBJ
)/$(APP_NAME
)
50 CXXFILES
= SimpleBootstrap_cpp.
cxx
52 OBJFILES
= $(patsubst %.
cxx,$(OUT_SLO_COMP
)/%.
$(OBJ_EXT
),$(CXXFILES
))
57 SimpleBootstrapCppExample
59 include $(SETTINGS
)/stdtarget.mk
61 $(OUT_APP_OBJ
)/%.
$(OBJ_EXT
) : %.
cxx $(SDKTYPEFLAG
)
62 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
63 $(CC
) $(CC_FLAGS
) $(CC_INCLUDES
) -I
$(OUT_APP_INC
) $(CC_DEFINES
) $(CC_OUTPUT_SWITCH
)$(subst /,$(PS
),$@
) $<
65 $(OUT_BIN
)/_
$(APP_NAME
)$(EXE_EXT
) : $(OUT_APP_OBJ
)/$(APP_NAME
).
$(OBJ_EXT
)
66 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
67 -$(MKDIR
) $(subst /,$(PS
),$(OUT_APP_GEN
))
69 $(LINK
) $(EXE_LINK_FLAGS
) /OUT
:$@
/MAP
:$(OUT_APP_GEN
)/$(basename $(@F
)).map \
70 $< $(CPPUHELPERLIB
) $(CPPULIB
) $(SALHELPERLIB
) $(SALLIB
)
72 $(LINK
) $(EXE_LINK_FLAGS
) $(LINK_LIBS
) -o
$@
$< \
73 $(CPPUHELPERLIB
) $(CPPULIB
) $(SALHELPERLIB
) $(SALLIB
) $(STDC
++LIB
)
75 $(INSTALL_NAME_URELIBS_BIN
) $@
79 $(OUT_BIN
)/$(APP_NAME
)$(EXE_EXT
) : $(OUT_BIN
)/_
$(APP_NAME
)$(EXE_EXT
)
80 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
81 $(COPY
) $(subst /,$(PS
),$(BIN_DIR
)/unoapploader
$(EXE_EXT
)) $(subst /,$(PS
),$@
)
82 # workaround for touch problem under Windows with full qualified paths
85 SimpleBootstrapCppExample
: $(OUT_BIN
)/$(APP_NAME
)$(EXE_EXT
)
86 @echo
--------------------------------------------------------------------------------
87 @echo Please use the following command to execute the example
!
89 @echo
$(MAKE
) SimpleBootstrap_cpp.run
90 @echo
--------------------------------------------------------------------------------
92 %.run
: $(OUT_BIN
)/SimpleBootstrap_cpp
$(EXE_EXT
)
93 cd
$(subst /,$(PS
),$(OUT_BIN
)) && $(basename $@
)
97 -$(DELRECURSIVE
) $(subst /,$(PS
),$(OUT_APP_INC
))
98 -$(DELRECURSIVE
) $(subst /,$(PS
),$(OUT_APP_GEN
))
99 -$(DELRECURSIVE
) $(subst /,$(PS
),$(OUT_APP_OBJ
))
100 -$(DEL
) $(subst \\,\
,$(subst /,$(PS
),$(OUT_BIN
)/*SimpleBootstrap
*))