2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 # Builds the SpreadSheet examples of the Developers Guide.
20 # This Makefile is supposed to be run by a GNU Make built for native
21 # Windows Not the Cygwin GNU Make, not dmake, not Microsoft's NMAKE.
22 # But yeah, that is what the setsdkenv_windows.bat file in
23 # ../../../.. presumably tries to set up.
26 SETTINGS
= $(PRJ
)/settings
28 include $(SETTINGS
)/settings.mk
29 include $(SETTINGS
)/std.mk
31 CSC_FLAGS
= -warnaserror
+ -noconfig
-platform
:x86
32 VBC_FLAGS
= -warnaserror
+
35 CSC_FLAGS
+= -debug
+ -checked
+ -define:DEBUG
-define:TRACE
36 VBC_FLAGS
+= -debug
+ -define:DEBUG
=1 -define:TRACE
=1
42 THIS_OUT_MISC
= $(OUT_MISC
)/csharp_SpreadsheetExamples
44 SPREADSHEET_OUT
:= $(OUT_BIN
)/CSharp_SpreadsheetExamples
47 # We are running in a LO build environment, good
48 CLI_LIB_LOCATION
= $(OUTDIR
)\bin
50 # Bad guess, but hey, this is how it was
51 CLI_LIB_LOCATION
= $(PRJ
)\cli
58 include $(SETTINGS
)/stdtarget.mk
62 #csc -lib:"d:\StarOffice 8" does not work. csc does not understand the quotes.
63 #but they are needed if the path contains a space. Therefore we use full path
64 #with the -reference switch
65 $(SPREADSHEET_OUT
)/%.exe
: %.cs SpreadsheetDocHelper.cs
66 -$(MKDIR
) $(subst /,$(PS
),$(@D
))
70 -reference
:"$(CLI_LIB_LOCATION)"\cli_basetypes.dll \
71 -reference
:"$(CLI_LIB_LOCATION)"\cli_uretypes.dll \
72 -reference
:"$(CLI_LIB_LOCATION)"\cli_oootypes.dll \
73 -reference
:"$(CLI_LIB_LOCATION)"\cli_ure.dll \
74 -reference
:"$(CLI_LIB_LOCATION)"\cli_cppuhelper.dll \
77 SpreadsheetSample
: $(SPREADSHEET_OUT
)/SpreadsheetSample.exe
79 GeneralTableSample
: $(SPREADSHEET_OUT
)/GeneralTableSample.exe
81 ViewSample
: $(SPREADSHEET_OUT
)/ViewSample.exe
85 Info
: SpreadsheetSample GeneralTableSample ViewSample
86 @echo
-------------------------------------------------------------------------------
87 @echo Please use one of the following commands to execute the examples
!
89 @echo
$(MAKE
) GeneralTableSample.run
90 @echo
$(MAKE
) SpreadsheetSample.run
91 @echo
$(MAKE
) ViewSample.run
92 @echo
-------------------------------------------------------------------------------
95 @echo
--------------------------------------------------------------------------------
96 @echo This example works only under Windows
!
97 @echo
--------------------------------------------------------------------------------
100 %.run
: $(SPREADSHEET_OUT
)/%.exe
101 @echo
-------------------------------------------------------------------------------
102 @echo Executing sample
$@
$(UNORC
) $(CONNECT_STRING
)...
103 @echo
-------------------------------------------------------------------------------
104 cd
$(subst /,\\,$(SPREADSHEET_OUT
)) && $(basename $@
).exe
108 -$(DELRECURSIVE
) $(subst /,$(PS
),$(OUT_BIN
)/CSharp_SpreadsheetExamples
)