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