1 #**************************************************************
2 #
3 #  Licensed to the Apache Software Foundation (ASF) under one
4 #  or more contributor license agreements.  See the NOTICE file
5 #  distributed with this work for additional information
6 #  regarding copyright ownership.  The ASF licenses this file
7 #  to you under the Apache License, Version 2.0 (the
8 #  "License"); you may not use this file except in compliance
9 #  with the License.  You may obtain a copy of the License at
10 #
11 #    http://www.apache.org/licenses/LICENSE-2.0
12 #
13 #  Unless required by applicable law or agreed to in writing,
14 #  software distributed under the License is distributed on an
15 #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 #  KIND, either express or implied.  See the License for the
17 #  specific language governing permissions and limitations
18 #  under the License.
19 #
20 #**************************************************************
21 
22 # Builds the OfficeDevDesktopEnvironment native library of the Developers Guide.
23 
24 PRJ=../../../../../..
25 SETTINGS=$(PRJ)/settings
26 
27 include $(SETTINGS)/settings.mk
28 include $(SETTINGS)/std.mk
29 include $(SETTINGS)/dk.mk
30 
31 # Define non-platform/compiler specific settings
32 SHL_NAME=nativeview
33 SHL_LIBRARY=$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT)
34 
35 OUT_SHL_SLO=$(OUT_SLO)/nativeview
36 OUT_SHL_MISC=$(OUT_MISC)/nativeview
37 
38 CFILES = nativeview.c
39 
40 SLOFILES = $(patsubst %.c,$(OUT_SHL_SLO)/%.$(OBJ_EXT),$(CFILES))
41 
42 # Targets
43 .PHONY: ALL
44 ALL : \
45     $(SHL_LIBRARY)
46 
47 include $(SETTINGS)/stdtarget.mk
48 
49 $(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c
50 	-$(MKDIR) $(subst /,$(PS),$(@D))
51 	$(CC) $(CC_FLAGS_JNI) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES_JNI) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
52 
53 $(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES) $(SHL_NAME).def
54 	-$(MKDIR) $(subst /,$(PS),$(@D))
55 	-$(MKDIR) $(subst /,$(PS),$(OUT_SHL_MISC))
56 	$(LINK) $(LIBRARY_LINK_FLAGS) /DEF:$(SHL_NAME).def /OUT:$@ \
57 	/MAP:$(OUT_SHL_MISC)/$(SHL_NAME).map $(LINK_JAVA_LIBS) \
58 	$(SLOFILES) jawt.lib msvcrt.lib kernel32.lib user32.lib
59 	$(LINK_MANIFEST)
60 
61 .PHONY: clean
62 clean :
63 	-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_SHL_SLO))
64 	-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_SHL_MISC))
65 	-$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT))$(PS)*$(SHL_NAME)*.*)
66