xref: /aoo42x/main/vcl/StaticLibrary_vclmain.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
28$(eval $(call gb_StaticLibrary_StaticLibrary,vclmain))
29
30$(eval $(call gb_StaticLibrary_set_include,vclmain,\
31	$$(INCLUDE) \
32	-I$(SRCDIR)/vcl/inc \
33	-I$(SRCDIR)/vcl/inc/pch \
34	-I$(SRCDIR)/solenv/inc \
35	-I$(OUTDIR)/inc/offuh \
36	-I$(OUTDIR)/inc/stl \
37	-I$(OUTDIR)/inc \
38))
39
40$(eval $(call gb_StaticLibrary_add_exception_objects,vclmain,\
41	vcl/source/salmain/salmain \
42))
43
44# HACK for now
45# We really should fix the clients of this to link against the static library
46# Instead of this evil linking of an object from $(OUTDIR)
47define StaticLibrary_salmain_hack
48$(call gb_StaticLibrary_get_target,vclmain) : $(OUTDIR)/lib/$(1)
49$$(eval $$(call gb_Deliver_add_deliverable,$(OUTDIR)/lib/$(1),$(call gb_CxxObject_get_target,vcl/source/salmain/salmain)))
50
51$(OUTDIR)/lib/$(1) : $(call gb_CxxObject_get_target,vcl/source/salmain/salmain)
52	$$(call gb_Deliver_deliver,$$<,$$@)
53
54endef
55
56ifeq ($(OS),WNT)
57$(eval $(call StaticLibrary_salmain_hack,salmain.obj))
58else
59$(eval $(call StaticLibrary_salmain_hack,salmain.o))
60endif
61
62# vim: set noet sw=4 ts=4:
63