Merge "Add PRIVATECOMMAND of ImfEvent in text-controller" into devel/master
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / Makefile.am
1 # Copyright (c) 2016 Samsung Electronics Co., Ltd.
2
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6
7 # http://www.apache.org/licenses/LICENSE-2.0
8
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 CLEANFILES = automatic/cpp/dali_wrap.* automatic/csharp/*.cs *.so *.dll \
16              manual/cpp/*.o \
17              examples/*.so examples/*.dll examples/*.exe
18
19 BUILT_SOURCES = automatic/cpp/dali_wrap.cpp automatic/cpp/dali_wrap.h
20
21 if HAVE_MCS
22 if BUILD_MCS
23
24 all-local: libNDalic.so NDali.dll
25
26 libNDalic.so: automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/event-thread-callback-wrap.o manual/cpp/devel-property-wrap.o
27         g++ -shared automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/event-thread-callback-wrap.o manual/cpp/devel-property-wrap.o -o libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS)
28
29 automatic/cpp/dali_wrap.o: $(BUILT_SOURCES)
30         g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) automatic/cpp/dali_wrap.cpp -o automatic/cpp/dali_wrap.o
31
32 manual/cpp/keyboard_focus_manager_wrap.o: $(BUILT_SOURCES)
33         g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/keyboard_focus_manager_wrap.cpp -o manual/cpp/keyboard_focus_manager_wrap.o
34
35 manual/cpp/view-wrapper-impl-wrap.o: $(BUILT_SOURCES)
36         g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/view-wrapper-impl-wrap.cpp -o manual/cpp/view-wrapper-impl-wrap.o
37
38 manual/cpp/event-thread-callback-wrap.o: $(BUILT_SOURCES)
39         g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/event-thread-callback-wrap.cpp -o manual/cpp/event-thread-callback-wrap.o
40
41 manual/cpp/devel-property-wrap.o: $(BUILT_SOURCES)
42         g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/devel-property-wrap.cpp -o manual/cpp/devel-property-wrap.o
43
44 NDali.dll: $(BUILT_SOURCES)
45         $(MCS) -nologo -target:library -out:NDali.dll automatic/csharp/*.cs manual/csharp/*.cs views/*.cs
46
47 check-local: examples/dali-test.exe \
48              examples/hello-world.exe \
49              examples/scroll-view.exe \
50              examples/custom-control.exe \
51              examples/date-picker.exe \
52              examples/control-dashboard.exe \
53              examples/date-picker-using-json.exe \
54              examples/json-loader.exe \
55              examples/user-alphafunction.exe \
56              examples/image-view.exe \
57              examples/visuals-example.exe \
58              examples/visuals-using-custom-view.exe \
59              examples/libNDalic.so examples/NDali.dll
60
61 examples/%.exe: examples/%.cs
62         $(MCS) -nologo -target:exe -out:$@ -reference:NDali.dll $<
63
64 examples/visuals-using-custom-view.exe: examples/visuals-using-custom-view/*.cs
65         $(MCS) -nologo -target:exe -out:$@ -reference:NDali.dll $^
66
67 examples/libNDalic.so: libNDalic.so
68         cd examples && ln -sf ../libNDalic.so
69
70 examples/NDali.dll: NDali.dll
71         cd examples && ln -sf ../NDali.dll
72
73 endif
74 endif
75
76 # use swig to generate the CS wrapper code
77 # then call our property-wrapper to inject DALi property getters / setters
78 $(BUILT_SOURCES): SWIG/*.i
79         rm -f automatic/csharp/*.cs
80         mkdir -p automatic/csharp
81         $(SWIG) -csharp -c++ -outdir automatic/csharp \
82             $(DALI_CFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) -namespace Dali -o automatic/cpp/dali_wrap.cpp SWIG/dali.i
83         ./property-wrapper.rb
84         ./constructor-generator.rb
85
86 # have manual binding for View now, but cannot stop swig generating binding for
87 # it as otherwise swig will not generate correct binding for any classes inherited
88 # from it, therefore have to delete the automatic binding for View in the end
89         rm -f automatic/csharp/View.cs
90
91 dist-hook: $(BUILT_SOURCES)
92         mkdir -p $(distdir)/automatic/cpp
93         cp ./automatic/cpp/*.cpp $(distdir)/automatic/cpp
94         cp ./automatic/cpp/*.h $(distdir)/automatic/cpp
95         mkdir -p $(distdir)/manual/cpp
96         cp ./manual/cpp/*.cpp $(distdir)/manual/cpp
97         cp ./manual/cpp/*.h $(distdir)/manual/cpp
98         mkdir -p $(distdir)/automatic/csharp
99         cp ./automatic/csharp/*.cs $(distdir)/automatic/csharp
100         mkdir -p $(distdir)/manual/csharp
101         cp ./manual/csharp/*.cs $(distdir)/manual/csharp
102         mkdir -p $(distdir)/examples
103         cp ./examples/*.csproj $(distdir)/examples
104         cp ./examples/*.cs $(distdir)/examples
105
106