1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # Builds the TerminationTest example of the SDK.
13 SETTINGS
=$(PRJ
)/settings
15 include $(SETTINGS
)/settings.mk
16 include $(SETTINGS
)/std.mk
18 # Define non-platform/compiler specific settings
19 APP_NAME
=TerminationTest
21 OUT_APP_INC
= $(OUT_INC
)/$(APP_NAME
)
22 OUT_APP_GEN
= $(OUT_MISC
)/$(APP_NAME
)
23 OUT_APP_OBJ
=$(OUT_OBJ
)/$(APP_NAME
)
25 CXXFILES
= TerminationTest.
cxx
27 OBJFILES
= $(patsubst %.
cxx,$(OUT_SLO_COMP
)/%.
$(OBJ_EXT
),$(CXXFILES
))
34 include $(SETTINGS
)/stdtarget.mk
36 $(OUT_APP_OBJ
)/%.
$(OBJ_EXT
) : %.
cxx $(SDKTYPEFLAG
)
37 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
38 $(CC
) $(CC_FLAGS
) $(CC_INCLUDES
) -I
$(OUT_APP_INC
) $(CC_DEFINES
) $(CC_OUTPUT_SWITCH
)$(subst /,$(PS
),$@
) $<
40 $(OUT_BIN
)/_
$(APP_NAME
)$(EXE_EXT
) : $(OUT_APP_OBJ
)/$(APP_NAME
).
$(OBJ_EXT
)
41 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
42 -$(MKDIR
) $(subst /,$(PS
),$(OUT_APP_GEN
))
44 $(LINK
) $(EXE_LINK_FLAGS
) /OUT
:$@
/MAP
:$(OUT_APP_GEN
)/$(basename $(@F
)).map \
45 $< $(CPPUHELPERLIB
) $(CPPULIB
) $(SALHELPERLIB
) $(SALLIB
)
47 $(LINK
) $(EXE_LINK_FLAGS
) $(LINK_LIBS
) -o
$@
$< \
48 $(CPPUHELPERLIB
) $(CPPULIB
) $(SALHELPERLIB
) $(SALLIB
) $(STDC
++LIB
)
50 $(INSTALL_NAME_URELIBS_BIN
) $@
54 $(OUT_BIN
)/$(APP_NAME
)$(EXE_EXT
) : $(OUT_BIN
)/_
$(APP_NAME
)$(EXE_EXT
)
55 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
56 $(COPY
) $(subst /,$(PS
),$(BIN_DIR
)/unoapploader
$(EXE_EXT
)) $(subst /,$(PS
),$@
)
57 # workaround for touch problem under Windows with full qualified paths
60 TerminationTest
: $(OUT_BIN
)/$(APP_NAME
)$(EXE_EXT
)
61 @echo
--------------------------------------------------------------------------------
62 @echo Please use the following command to execute the example
!
64 @echo
$(MAKE
) TerminationTest.run
65 @echo
--------------------------------------------------------------------------------
67 %.run
: $(OUT_BIN
)/TerminationTest
$(EXE_EXT
)
68 cd
$(subst /,$(PS
),$(OUT_BIN
)) && $(basename $@
)
72 -$(DELRECURSIVE
) $(subst /,$(PS
),$(OUT_APP_INC
))
73 -$(DELRECURSIVE
) $(subst /,$(PS
),$(OUT_APP_GEN
))
74 -$(DELRECURSIVE
) $(subst /,$(PS
),$(OUT_APP_OBJ
))
75 -$(DEL
) $(subst \\,\
,$(subst /,$(PS
),$(OUT_BIN
)/*TerminationTest
*))
77 # vim: set noet sw=4 ts=4: