1 # -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
3 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License or as specified alternatively below. You may obtain a copy of
8 # the License at http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
15 # Major Contributor(s):
16 # Copyright (C) 2011 Matúš Kukan <matus.kukan@gmail.com> (initial developer)
18 # All Rights Reserved.
20 # For minor contributions see the git repository.
22 # Alternatively, the contents of this file may be used under the terms of
23 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 # instead of those above.
28 $(eval
$(call gb_CustomTarget_CustomTarget
,sal
/generated
))
30 sal_DIR
:= $(call gb_CustomTarget_get_workdir
,sal
/generated
)
32 $(call gb_CustomTarget_get_target
,sal
/generated
) : \
33 $(sal_DIR
)/sal
/udkversion.h \
34 $(if
$(filter-out $(COM
),MSC
),$(sal_DIR
)/sal
/typesizes.h
)
36 $(sal_DIR
)/sal
/typesizes.h
:|
$(sal_DIR
)/sal
/.
dir
37 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
38 echo
'/* This file is autogenerated from configure script data */' > $@
40 echo
"#define SAL_TYPES_ALIGNMENT2 $(ALIGNOF_SHORT)" >> $@
41 echo
"#define SAL_TYPES_ALIGNMENT4 $(ALIGNOF_INT)" >> $@
42 ifeq ($(SIZEOF_LONG
),8)
43 echo
"#define SAL_TYPES_ALIGNMENT8 $(ALIGNOF_LONG)" >> $@
44 else ifeq ($(SIZEOF_DOUBLE
),8)
45 echo
"#define SAL_TYPES_ALIGNMENT8 $(ALIGNOF_DOUBLE)" >> $@
47 echo
"#error alignment of some 8-byte type unknown" >> $@
49 echo
"#define SAL_TYPES_SIZEOFSHORT $(SIZEOF_SHORT)" >> $@
50 echo
"#define SAL_TYPES_SIZEOFINT $(SIZEOF_INT)" >> $@
51 echo
"#define SAL_TYPES_SIZEOFLONG $(SIZEOF_LONG)" >> $@
52 echo
"#define SAL_TYPES_SIZEOFLONGLONG $(SIZEOF_LONGLONG)" >> $@
53 echo
"#define SAL_TYPES_SIZEOFPOINTER $(SIZEOF_POINTER)" >> $@
55 include $(SRCDIR
)/solenv
/inc
/udkversion.mk
57 $(sal_DIR
)/sal
/udkversion.h
:|
$(sal_DIR
)/sal
/.
dir
58 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
59 echo
'#ifndef _SAL_UDKVERSION_H_' > $@
60 echo
'#define _SAL_UDKVERSION_H_' >> $@
62 echo
'#define SAL_UDK_MAJOR "$(UDK_MAJOR)"' >> $@
63 echo
'#define SAL_UDK_MINOR "$(UDK_MINOR)"' >> $@
64 echo
'#define SAL_UDK_MICRO "$(UDK_MICRO)"' >> $@
68 # vim: set noet sw=4 ts=4: