summaryrefslogtreecommitdiffstats
path: root/sal/util
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2011-12-17 13:13:11 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2011-12-19 10:14:53 +0100
commita9e130ab82f3216334e432e9d6ee19a600b6c287 (patch)
treee36f219b5e5b854335657dc57410bb401b9e3ec1 /sal/util
parentcppu: add visibility symbols (diff)
downloadcore-a9e130ab82f3216334e432e9d6ee19a600b6c287.tar.gz
core-a9e130ab82f3216334e432e9d6ee19a600b6c287.zip
sal: convert to gbuild
Diffstat (limited to 'sal/util')
-rw-r--r--sal/util/Makefile78
-rw-r--r--sal/util/makefile.mk177
-rw-r--r--[-rwxr-xr-x]sal/util/sal.map0
-rw-r--r--sal/util/sal_textenc/makefile.mk46
4 files changed, 78 insertions, 223 deletions
diff --git a/sal/util/Makefile b/sal/util/Makefile
new file mode 100644
index 000000000000..78986f793cb6
--- /dev/null
+++ b/sal/util/Makefile
@@ -0,0 +1,78 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Matúš Kukan <matus.kukan@gmail.com> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+gb_PARTIALBUILD:=T
+include $(GBUILDDIR)/gbuild_simple.mk
+
+all: rtlbootstrap.mk $(if $(filter-out $(COM),MSC),sal/typesizes.h) sal/udkversion.h sal
+
+sal:
+ mkdir sal
+
+rtlbootstrap.mk:
+ (echo '#include "macro.hxx"'; echo RTL_OS:=THIS_OS; echo RTL_ARCH:=THIS_ARCH) > bootstrap.cxx
+ $(CXX) -E $(gb_OSDEFS) -D$(CPUNAME) -I. -I$(SRCDIR)/sal/rtl/source -I$(SRCDIR)/sal/inc bootstrap.cxx | grep '^RTL_' | sed -e 's/"//g' > $@
+
+sal/typesizes.h: sal
+ifneq ($(CROSS_COMPILING),YES)
+ $(gb_Helper_execute)typesconfig $@ > /dev/null
+
+else
+ echo '/* This file is autogenerated from configure script data */' > $@
+ echo >> $@
+ echo "#define SAL_TYPES_ALIGNMENT2 $(ALIGNOF_SHORT)" >> $@
+ echo "#define SAL_TYPES_ALIGNMENT4 $(ALIGNOF_INT)" >> $@
+ifeq ($(SIZEOF_LONG),8)
+ echo "#define SAL_TYPES_ALIGNMENT8 $(ALIGNOF_LONG)" >> $@
+else ifeq ($(SIZEOF_DOUBLE),8)
+ echo "#define SAL_TYPES_ALIGNMENT8 $(ALIGNOF_DOUBLE)" >> $@
+else
+ echo "#error alignment of some 8-byte type unknown" >> $@
+endif
+ echo "#define SAL_TYPES_SIZEOFSHORT $(SIZEOF_SHORT)" >> $@
+ echo "#define SAL_TYPES_SIZEOFINT $(SIZEOF_INT)" >> $@
+ echo "#define SAL_TYPES_SIZEOFLONG $(SIZEOF_LONG)" >> $@
+ echo "#define SAL_TYPES_SIZEOFLONGLONG $(SIZEOF_LONGLONG)" >> $@
+ echo "#define SAL_TYPES_SIZEOFPOINTER $(SIZEOF_POINTER)" >> $@
+
+endif
+
+include $(SRCDIR)/solenv/inc/udkversion.mk
+
+sal/udkversion.h: sal
+ echo '#ifndef _SAL_UDKVERSION_H_' > $@
+ echo '#define _SAL_UDKVERSION_H_' >> $@
+ echo '' >> $@
+ echo '#define SAL_UDK_MAJOR "$(UDK_MAJOR)"' >> $@
+ echo '#define SAL_UDK_MINOR "$(UDK_MINOR)"' >> $@
+ echo '#define SAL_UDK_MICRO "$(UDK_MICRO)"' >> $@
+ echo '' >> $@
+ echo '#endif' >> $@
+
+.DEFAULT_GOAL := all
+.PHONY: all
+# vim: set noet sw=4 ts=4:
diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk
deleted file mode 100644
index 1696d5e01d1f..000000000000
--- a/sal/util/makefile.mk
+++ /dev/null
@@ -1,177 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=sal
-TARGET=sal
-
-NO_DEFAULT_STL=TRUE
-
-USE_LDUMP2=TRUE
-USE_DEFFILE=TRUE
-
-.IF "$(GUI)"=="UNX"
-TARGETTYPE=CUI
-.ENDIF # UNX
-
-UNIXVERSIONNAMES=UDK
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGS+= $(LFS_CFLAGS)
-CXXFLAGS+= $(LFS_CFLAGS)
-
-.IF "$(depend)" == ""
-
-# --- Files --------------------------------------------------------
-
-# disable check for PIC code as it would complain about
-# hand coded assembler
-CHECKFORPIC=
-
-.IF "$(header)" == ""
-
-LIB1TARGET=$(SLB)$/$(TARGET).lib
-LIB1FILES= \
- $(SLB)$/oslall.lib \
- $(SLB)$/cpposl.lib \
- $(SLB)$/cpprtl.lib \
- $(SLB)$/textenc.lib
-
-.IF "$(COM)" == "MSC"
-SHL1TARGET= $(TARGET)
-SHL1IMPLIB= i$(TARGET)
-.ELSE
-SHL1TARGET= uno_$(TARGET)
-SHL1IMPLIB= uno_$(TARGET)
-.ENDIF
-SHL1VERSIONMAP= $(TARGET).map
-SHL1RPATH=URELIB
-
-.IF "$(GUI)"=="WNT"
-
-.IF "$(COM)"=="GCC"
-UWINAPILIB= -luwinapi
-.ELSE
-UWINAPILIB= $(LB)$/uwinapi.lib
-.ENDIF
-
-SHL1STDLIBS= \
- $(UWINAPILIB)\
- $(ADVAPI32LIB)\
- $(WS2_32LIB)\
- $(MPRLIB)\
- $(SHELL32LIB)\
- $(COMDLG32LIB)\
- $(USER32LIB)\
- $(OLE32LIB)
-.IF "$(COM)"=="GCC"
-MINGWSSTDOBJ=
-MINGWSSTDENDOBJ=
-.ENDIF
-.ENDIF # WNT
-
-.IF "$(GUI)"=="UNX"
-.IF "$(OS)"=="SOLARIS"
-# libposix4.so (SunOS 5.6) <-> librt.so (SunOS >= 5.7)
-SHL1STDLIBS= -Bdynamic -ldl -lpthread -lposix4 -lsocket -lnsl
-.IF "$(COM)" == "C50"
-SHL1STDLIBS+= -z allextract -staticlib=Crun -z defaultextract
-.ENDIF # C50
-.ENDIF # SOLARIS
-.ENDIF # UNX
-
-.IF "$(OS)"=="MACOSX"
-SHL1STDLIBS+=-framework CoreFoundation -framework Carbon
-.ENDIF
-
-.IF "$(OS)" == "ANDROID"
-SHL1STDLIBS+=-llo-bootstrap
-.ENDIF
-
-SHL1LIBS+=$(SLB)$/$(TARGET).lib
-
-.IF "$(linkinc)" != ""
-SHL11FILE=$(MISC)$/sal.slo
-.ELSE
-.IF "$(GUI)"=="UNX"
-SHL1OBJS=
-.ELSE
-.IF "$(GUI)$(COM)"!="WNTGCC"
-SHL1OBJS= \
- $(SLO)$/dllentry.obj
-.ENDIF # WNTGCC
-.ENDIF # UNX
-.ENDIF # lincinc
-
-SHL1DEPN=
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME= $(SHL1TARGET)
-
-# --- Coverage -----------------------------------------------------
-# LLA: 20040304 The follows lines are an additional which is only need if we run
-# coverage tests. For normal test runs this feature is not used.
-# For more information about coverage tests see:
-# http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_8.html
-#
-# Why this additional?
-# Anybody has decide to link sal with g++ instead of gcc.
-#
-.IF "$(TESTCOVERAGE)"!=""
-.IF "$(GUI)"=="UNX"
-.IF "$(COM)"=="GCC"
-.IF "$(OS)"=="LINUX"
-SHL1STDLIBS+=-lgcc
-.ENDIF
-.ENDIF
-.ENDIF
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.ENDIF # $(header) != ""
-.ENDIF # $(depend) != ""
-
-.INCLUDE : target.mk
-
-.IF "$(SHL1TARGETN)" != ""
-$(SHL1TARGETN) : $(OUT)$/inc$/udkversion.h
-.ENDIF # "$(SHL1TARGETN)" != ""
-
-$(OUT)$/inc$/udkversion.h:
- echo '#ifndef _SAL_UDKVERSION_H_' > $@
- echo '#define _SAL_UDKVERSION_H_' >> $@
- echo '' >> $@
- echo '#define SAL_UDK_MAJOR "$(UDK_MAJOR)"' >> $@
- echo '#define SAL_UDK_MINOR "$(UDK_MINOR)"' >> $@
- echo '#define SAL_UDK_MICRO "$(UDK_MICRO)"' >> $@
- echo '' >> $@
- echo '#endif' >> $@
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 797c1a25c576..797c1a25c576 100755..100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
diff --git a/sal/util/sal_textenc/makefile.mk b/sal/util/sal_textenc/makefile.mk
deleted file mode 100644
index ec133ee98a2c..000000000000
--- a/sal/util/sal_textenc/makefile.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
-# (initial developer) ]
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-PRJ = ../..
-PRJNAME = sal
-TARGET = sal_textenc
-
-# Should be VISIBILITY_HIDDEN=TRUE, but sal/textenc contains objects that end up
-# in both sal and sal_textenc libraries, so need to use a map file here for now.
-
-.INCLUDE: settings.mk
-
-# Should be DLLPRE= as it is loaded dynamically, but IOS links against it.
-
-SHL1IMPLIB = i$(SHL1TARGET)
-SHL1LIBS = $(SLB)/textenc_tables.lib
-SHL1RPATH = URELIB
-SHL1STDLIBS = $(SALLIB)
-SHL1TARGET = sal_textenc
-SHL1VERSIONMAP = saltextenc.map
-DEF1NAME = $(SHL1TARGET)
-
-.INCLUDE: target.mk