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 23 24PRJ=..$/..$/.. 25 26PRJNAME=odk 27TARGET=unowinreg 28ENABLE_EXCEPTIONS=TRUE 29 30NO_DEFAULT_STL=TRUE 31NO_BSYMBOLIC=TRUE 32USE_DEFFILE=TRUE 33 34# --- Settings ----------------------------------------------------- 35 36.INCLUDE : settings.mk 37 38JAVA_INCLUDES:= -I$(JAVA_HOME)/include 39 40# values taken from set_soenv.in 41.IF "$(OS)" == "LINUX" 42JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux 43.ELIF "$(OS)" == "FREEBSD" 44JAVA_INCLUDES+= -I$(JAVA_HOME)/include/freebsd 45JAVA_INCLUDES+= -I$(JAVA_HOME)/include/bsd 46JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux 47.ELIF "$(OS)" == "NETBSD" 48JAVA_INCLUDES+= -I$(JAVA_HOME)/include/netbsd 49.ENDIF 50 51.IF "$(SOLAR_JAVA)"=="" 52nojava: 53 @echo "Not building javaunohelper because Java is disabled" 54.ENDIF 55 56.IF "$(OS)" != "WNT" 57 58.IF "$(BUILD_UNOWINREG)" == "YES" 59 60$(BIN)$/unowinreg.dll : unowinreg.cxx 61 $(MINGWCXX) -Wall -D_JNI_IMPLEMENTATION_ $(JAVA_INCLUDES) \ 62 -I$(PRJ)/inc/pch -shared -o $(BIN)$/unowinreg.dll unowinreg.cxx \ 63 -Wl,--kill-at -lkernel32 -ladvapi32 64 $(MINGWSTRIP) $(BIN)$/unowinreg.dll 65 66.ELSE 67 68$(BIN)$/unowinreg.dll : $(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT)$/unowinreg.dll 69 @@-rm -f $@ 70 $(GNUCOPY) $< $@ 71 72.ENDIF 73 74.ELSE # "$(OS)" != "WNT" 75# Always build unowinreg.dll on windows 76 77# --- Files -------------------------------------------------------- 78 79LINKFLAGS+=-MANIFEST:NO 80SLOFILES = \ 81 $(SLO)$/unowinreg.obj 82SHL1TARGET=$(TARGET) 83SHL1LIBS=$(SLB)$/$(TARGET).lib 84 85#No default libraries 86STDSHL= 87.IF "$(COM)"=="GCC" 88SHL1STDLIBS += -lstdc++ 89.IF "$(MINGW_GCCLIB_EH)"=="YES" 90SHL1STDLIBS += -lgcc_eh 91.ENDIF 92SHL1STDLIBS += -lgcc -lmingw32 -lmoldname -lmsvcrt 93.ENDIF 94 95SHL1STDLIBS +=\ 96 $(KERNEL32LIB)\ 97 $(ADVAPI32LIB) 98 99SHL1DEF=$(MISC)$/$(SHL1TARGET).def 100 101DEF1NAME=$(SHL1TARGET) 102DEF1EXPORTFILE=$(TARGET).dxp 103DEF1DES=unowinreg 104 105.ENDIF # "$(OS)" != "WNT" 106 107# --- Targets ------------------------------------------------------ 108 109.INCLUDE : target.mk 110 111