np_sdk: separate system and internal headers

Change-Id: I4c61dcb40acf12fa0fe4cf4d6c39a8bfd7b7c9b4
This commit is contained in:
Matúš Kukan 2012-06-02 21:54:26 +02:00
parent 0d59b7bf1b
commit 8f6510b31f
7 changed files with 53 additions and 15 deletions

View File

@ -54,22 +54,21 @@ endif
ifeq ($(SYSTEM_MOZILLA_HEADERS),YES)
define gb_LinkTarget__use_mozilla_headers
$(eval $(call gb_LinkTarget_use_package,$(1),np_sdk_inc))
$(eval $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_set_include,$(1),\
$(MOZILLA_HEADERS_CFLAGS) \
$$(INCLUDE) \
))
)
endef
else #!SYSTEM_MOZILLA_HEADERS
define gb_LinkTarget__use_mozilla_headers
$(eval $(call gb_LinkTarget_use_package,$(1),np_sdk_inc))
$(eval $(call gb_LinkTarget_set_include,$(1),\
-I$(OUTDIR)/inc/npsdk \
$(call gb_LinkTarget_use_package,$(1),mozilla_inc)
$(call gb_LinkTarget_set_include,$(1),\
-I$(OUTDIR)/inc/external/npsdk \
$$(INCLUDE) \
))
)
endef

View File

@ -30,6 +30,8 @@
$(eval $(call gb_Executable_Executable,pluginapp.bin))
$(eval $(call gb_Executable_use_package,pluginapp.bin,np_sdk_inc))
$(eval $(call gb_Executable_use_external,pluginapp.bin,mozilla_headers))
$(eval $(call gb_Executable_set_include,pluginapp.bin,\

View File

@ -32,6 +32,8 @@ $(eval $(call gb_Library_Library,pl))
$(eval $(call gb_Library_set_componentfile,pl,extensions/source/plugin/pl))
$(eval $(call gb_Library_use_package,pl,np_sdk_inc))
$(eval $(call gb_Library_use_external,pl,mozilla_headers))
$(eval $(call gb_Library_set_include,pl,\

View File

@ -31,6 +31,8 @@ endif
$(eval $(call gb_StaticLibrary_StaticLibrary,plugcon))
$(eval $(call gb_StaticLibrary_use_package,plugcon,np_sdk_inc))
$(eval $(call gb_StaticLibrary_use_external,plugcon,mozilla_headers))
$(eval $(call gb_StaticLibrary_set_include,plugcon,\

View File

@ -33,6 +33,12 @@ $(eval $(call gb_Module_add_targets,np_sdk,\
Package_inc \
))
ifeq ($(SYSTEM_MOZILLA_HEADERS),NO)
$(eval $(call gb_Module_add_targets,np_sdk,\
Package_mozilla_inc \
))
endif
ifeq ($(ENABLE_NSPLUGIN),YES)
$(eval $(call gb_Module_add_targets,np_sdk,\
StaticLibrary_nputils \

View File

@ -32,12 +32,4 @@ $(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/jri_md.h,mozsrc/jri_md.h)
$(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/jritypes.h,mozsrc/jritypes.h))
$(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/npupp.h,mozsrc/npupp.h))
ifeq ($(SYSTEM_MOZILLA_HEADERS),NO)
$(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/npapi.h,inc/npapi.h))
$(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/npfunctions.h,inc/npfunctions.h))
$(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/npruntime.h,inc/npruntime.h))
$(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/nptypes.h,inc/nptypes.h))
endif
# vim: set noet sw=4 ts=4:

View File

@ -0,0 +1,35 @@
# -*- Mode: makefile-gmake; 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) 2012 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.
$(eval $(call gb_Package_Package,mozilla_inc,$(SRCDIR)/np_sdk))
$(eval $(call gb_Package_add_file,mozilla_inc,inc/external/npsdk/npapi.h,inc/npapi.h))
$(eval $(call gb_Package_add_file,mozilla_inc,inc/external/npsdk/npfunctions.h,inc/npfunctions.h))
$(eval $(call gb_Package_add_file,mozilla_inc,inc/external/npsdk/npruntime.h,inc/npruntime.h))
$(eval $(call gb_Package_add_file,mozilla_inc,inc/external/npsdk/nptypes.h,inc/nptypes.h))
# vim: set noet sw=4 ts=4: