Update ooo320-m1
[ooovba.git] / odk / source / unowinreg / win / makefile.mk
blob7c826ddb265cf4692a8684d37cccddf450de4c8a
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.12.34.1 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 PRJ=..$/..$/..
34 PRJNAME=odk
35 TARGET=unowinreg
36 ENABLE_EXCEPTIONS=TRUE
38 NO_DEFAULT_STL=TRUE
39 NO_BSYMBOLIC=TRUE
40 USE_DEFFILE=TRUE
42 # --- Settings -----------------------------------------------------
44 .INCLUDE : settings.mk
46 JAVA_INCLUDES:= -I$(JAVA_HOME)/include
48 # values taken from set_soenv.in
49 .IF "$(JDK)" != "gcj"
50 .IF "$(OS)" == "LINUX"
51 JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux
52 .ELIF "$(OS)" == "FREEBSD"
53 JAVA_INCLUDES+= -I$(JAVA_HOME)/include/freebsd
54 JAVA_INCLUDES+= -I$(JAVA_HOME)/include/bsd
55 JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux
56 .ELIF "$(OS)" == "NETBSD"
57 JAVA_INCLUDES+= -I$(JAVA_HOME)/include/netbsd
58 .ELIF "$(OS)" == "IRIX"
59 JAVA_INCLUDES+= -I$(JAVA_HOME)/include/solaris
60 .ENDIF
61 .ENDIF
63 .IF "$(SOLAR_JAVA)"==""
64 nojava:
65 @echo "Not building javaunohelper because Java is disabled"
66 .ENDIF
68 .IF "$(OS)" != "WNT"
70 .IF "$(BUILD_UNOWINREG)" == "YES"
72 $(BIN)$/unowinreg.dll : unowinreg.cxx
73 $(MINGWCXX) -Wall -D_JNI_IMPLEMENTATION_ $(JAVA_INCLUDES) \
74 -I$(PRJ)/inc/pch -shared -o $(BIN)$/unowinreg.dll unowinreg.cxx \
75 -Wl,--kill-at -lkernel32 -ladvapi32
76 $(MINGWSTRIP) $(BIN)$/unowinreg.dll
78 .ELSE
80 $(BIN)$/unowinreg.dll : $(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT)$/unowinreg.dll
81 @@-rm -f $@
82 $(GNUCOPY) $< $@
84 .ENDIF
86 .ELSE # "$(OS)" != "WNT"
87 # Always build unowinreg.dll on windows
89 # --- Files --------------------------------------------------------
91 LINKFLAGS+=-MANIFEST:NO
92 SLOFILES = \
93 $(SLO)$/unowinreg.obj
94 SHL1TARGET=$(TARGET)
95 SHL1LIBS=$(SLB)$/$(TARGET).lib
97 #No default libraries
98 STDSHL=
99 .IF "$(COM)"=="GCC"
100 SHL1STDLIBS += -lstdc++
101 .IF "$(MINGW_GCCLIB_EH)"=="YES"
102 SHL1STDLIBS += -lgcc_eh
103 .ENDIF
104 SHL1STDLIBS += -lgcc -lmingw32 -lmoldname -lmsvcrt
105 .ENDIF
107 SHL1STDLIBS +=\
108 $(KERNEL32LIB)\
109 $(ADVAPI32LIB)
111 SHL1DEF=$(MISC)$/$(SHL1TARGET).def
113 DEF1NAME=$(SHL1TARGET)
114 DEF1EXPORTFILE=$(TARGET).dxp
115 DEF1DES=unowinreg
117 .ENDIF # "$(OS)" != "WNT"
119 # --- Targets ------------------------------------------------------
121 .INCLUDE : target.mk