1 # Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 CLEANFILES = automatic/cpp/dali_wrap.* automatic/csharp/*.cs *.so *.dll \
17 examples/*.so examples/*.dll examples/*.exe
19 BUILT_SOURCES = automatic/cpp/dali_wrap.cpp automatic/cpp/dali_wrap.h
24 all-local: libNDalic.so NDali.dll
26 libNDalic.so: automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o
27 g++ -shared automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o -o libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS)
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
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
35 NDali.dll: $(BUILT_SOURCES)
36 $(MCS) -nologo -target:library -out:NDali.dll automatic/csharp/*.cs manual/csharp/*.cs
38 check-local: examples/dali-test.exe \
39 examples/hello-world.exe \
40 examples/scroll-view.exe \
41 examples/libNDalic.so examples/NDali.dll
43 examples/%.exe: examples/%.cs
44 $(MCS) -nologo -target:exe -out:$@ -reference:NDali.dll $<
46 examples/libNDalic.so: libNDalic.so
47 cd examples && ln -sf ../libNDalic.so
49 examples/NDali.dll: NDali.dll
50 cd examples && ln -sf ../NDali.dll
55 # use swig to generate the CS wrapper code
56 # then call our property-wrapper to inject DALi property getters / setters
57 $(BUILT_SOURCES): SWIG/*.i
58 rm -f automatic/csharp/*.cs
59 $(SWIG) -csharp -c++ -outdir automatic/csharp \
60 $(DALI_CFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) -namespace Dali -o automatic/cpp/dali_wrap.cpp SWIG/dali.i
61 ./constructor-generator.rb
63 dist-hook: $(BUILT_SOURCES)
64 mkdir -p $(distdir)/automatic/cpp
65 cp ./automatic/cpp/*.cpp $(distdir)/automatic/cpp
66 cp ./automatic/cpp/*.h $(distdir)/automatic/cpp
67 mkdir -p $(distdir)/manual/cpp
68 cp ./manual/cpp/*.cpp $(distdir)/manual/cpp
69 cp ./manual/cpp/*.h $(distdir)/manual/cpp
70 mkdir -p $(distdir)/automatic/csharp
71 cp ./automatic/csharp/*.cs $(distdir)/automatic/csharp
72 mkdir -p $(distdir)/manual/csharp
73 cp ./manual/csharp/*.cs $(distdir)/manual/csharp
74 mkdir -p $(distdir)/examples
75 cp ./examples/*.csproj $(distdir)/examples
76 cp ./examples/*.cs $(distdir)/examples