| 1 |
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- |
| 2 |
# |
| 3 |
# This file is part of the LibreOffice project. |
| 4 |
# |
| 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/. |
| 8 |
# |
| 9 |
|
| 10 |
# Builds the TerminationTest example of the SDK. |
| 11 |
|
| 12 |
PRJ=../../../../.. |
| 13 |
SETTINGS=$(PRJ)/settings |
| 14 |
|
| 15 |
include $(SETTINGS)/settings.mk |
| 16 |
include $(SETTINGS)/std.mk |
| 17 |
|
| 18 |
# Define non-platform/compiler specific settings |
| 19 |
APP_NAME=TerminationTest |
| 20 |
|
| 21 |
OUT_APP_INC = $(OUT_INC)/$(APP_NAME) |
| 22 |
OUT_APP_GEN = $(OUT_MISC)/$(APP_NAME) |
| 23 |
OUT_APP_OBJ=$(OUT_OBJ)/$(APP_NAME) |
| 24 |
|
| 25 |
CXXFILES = TerminationTest.cxx |
| 26 |
|
| 27 |
OBJFILES = $(patsubst %.cxx,$(OUT_SLO_COMP)/%.$(OBJ_EXT),$(CXXFILES)) |
| 28 |
|
| 29 |
# Targets |
| 30 |
.PHONY: ALL |
| 31 |
ALL : \ |
| 32 |
TerminationTest |
| 33 |
|
| 34 |
include $(SETTINGS)/stdtarget.mk |
| 35 |
|
| 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),$@) $< |
| 39 |
|
| 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)) |
| 43 |
ifeq "$(OS)" "WIN" |
| 44 |
$(LINK) $(EXE_LINK_FLAGS) /OUT:$@ /MAP:$(OUT_APP_GEN)/$(basename $(@F)).map \ |
| 45 |
$< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) |
| 46 |
else |
| 47 |
$(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \ |
| 48 |
$(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) |
| 49 |
ifeq "$(OS)" "MACOSX" |
| 50 |
$(INSTALL_NAME_URELIBS_BIN) $@ |
| 51 |
endif |
| 52 |
endif |
| 53 |
|
| 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 |
| 58 |
make -t $@ |
| 59 |
|
| 60 |
TerminationTest: $(OUT_BIN)/$(APP_NAME)$(EXE_EXT) |
| 61 |
@echo -------------------------------------------------------------------------------- |
| 62 |
@echo Please use the following command to execute the example! |
| 63 |
@echo - |
| 64 |
@echo $(MAKE) TerminationTest.run |
| 65 |
@echo -------------------------------------------------------------------------------- |
| 66 |
|
| 67 |
%.run: $(OUT_BIN)/TerminationTest$(EXE_EXT) |
| 68 |
cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) |
| 69 |
|
| 70 |
.PHONY: clean |
| 71 |
clean : |
| 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*)) |
| 76 |
|
| 77 |
# vim: set noet sw=4 ts=4: |