summaryrefslogtreecommitdiff
path: root/np_sdk
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-01-11 16:55:50 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2012-01-11 20:20:17 +0100
commitb99010d1eba38c14719e9b34fbaa57591e3aed42 (patch)
treed81a8b184feb5f926c7f918d9bbb6e612c49a69e /np_sdk
parent317bbb5e8fdb76af73dff509afb00b4063150e11 (diff)
np_sdk: convert to gbuild and add to tail_build
Diffstat (limited to 'np_sdk')
-rw-r--r--np_sdk/Makefile (renamed from np_sdk/mozsrc/makefile.mk)48
-rw-r--r--np_sdk/Module_np_sdk.mk38
-rw-r--r--np_sdk/Package_inc.mk43
-rw-r--r--np_sdk/StaticLibrary_nputils.mk53
-rw-r--r--np_sdk/mozsrc/npwin.cxx (renamed from np_sdk/mozsrc/npwin.cpp)0
-rw-r--r--np_sdk/prj/build.lst3
-rw-r--r--np_sdk/prj/d.lst8
-rw-r--r--np_sdk/prj/makefile.mk1
8 files changed, 146 insertions, 48 deletions
diff --git a/np_sdk/mozsrc/makefile.mk b/np_sdk/Makefile
index c0722548ec06..7bbbe6c703e6 100644
--- a/np_sdk/mozsrc/makefile.mk
+++ b/np_sdk/Makefile
@@ -1,3 +1,4 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,44 +26,15 @@
#
#*************************************************************************
-PRJ=..
+gb_PARTIALBUILD := T
+ifeq ($(strip $(SOLARENV)),)
+include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../solenv/gbuild/source_and_rerun.mk
+else
-PRJNAME=np_sdk
-TARGET=npsdk
+gb_SourceEnvAndRecurse_STAGE=gbuild
+include $(SOLARENV)/gbuild/gbuild.mk
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(OS)"!="IOS" && "$(OS)"!="ANDROID"
-.IF "$(L10N_framework)"==""
-JDKINCS=
-
-.IF "$(SYSTEM_MOZILLA_HEADERS)" = "YES"
-CFLAGS+= $(MOZILLA_HEADERS_CFLAGS)
-CXXFLAGS+= $(MOZILLA_HEADERS_CFLAGS)
-.ELSE
-CFLAGS+= -I..$/inc
-CXXFLAGS+= -I..$/inc
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-.IF "$(GUI)" == "WNT"
-MOZFILES = $(SLO)$/npwin.obj
-.ELSE
-MOZFILES = $(SLO)$/npunix.obj
-.ENDIF
-
-.IF "$(GUIBASE)" == "aqua"
-CDEFS+=-DNO_X11
-.ENDIF
-
-ALL: $(MOZFILES)
-
-# --- Targets ------------------------------------------------------
-.ENDIF # L10N_framework
-.ENDIF # iOS or Android
-
-.INCLUDE : target.mk
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/np_sdk/Module_np_sdk.mk b/np_sdk/Module_np_sdk.mk
new file mode 100644
index 000000000000..bda81264c744
--- /dev/null
+++ b/np_sdk/Module_np_sdk.mk
@@ -0,0 +1,38 @@
+# -*- 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_Module_Module,np_sdk))
+
+ifeq ($(WITH_MOZILLA),YES)
+$(eval $(call gb_Module_add_targets,np_sdk,\
+ Package_inc \
+ StaticLibrary_nputils \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/np_sdk/Package_inc.mk b/np_sdk/Package_inc.mk
new file mode 100644
index 000000000000..26dc5371aee4
--- /dev/null
+++ b/np_sdk/Package_inc.mk
@@ -0,0 +1,43 @@
+# -*- 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,np_sdk_inc,$(SRCDIR)/np_sdk))
+
+$(eval $(call gb_Package_add_file,np_sdk_inc,inc/npsdk/jri.h,mozsrc/jri.h))
+$(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:
diff --git a/np_sdk/StaticLibrary_nputils.mk b/np_sdk/StaticLibrary_nputils.mk
new file mode 100644
index 000000000000..b0c976413a15
--- /dev/null
+++ b/np_sdk/StaticLibrary_nputils.mk
@@ -0,0 +1,53 @@
+# -*- 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_StaticLibrary_StaticLibrary,nputils))
+
+$(eval $(call gb_StaticLibrary_use_externals,nputils,\
+ mozilla_headers \
+))
+
+ifeq ($(GUIBASE),aqua)
+$(eval $(call gb_StaticLibrary_add_defs,nputils,\
+ -DNO_X11 \
+))
+
+endif
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_StaticLibrary_add_exception_objects,nputils,\
+ np_sdk/mozsrc/npwin \
+))
+
+else
+$(eval $(call gb_StaticLibrary_add_cobjects,nputils,\
+ np_sdk/mozsrc/npunix \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/np_sdk/mozsrc/npwin.cpp b/np_sdk/mozsrc/npwin.cxx
index f31b621e37ee..f31b621e37ee 100644
--- a/np_sdk/mozsrc/npwin.cpp
+++ b/np_sdk/mozsrc/npwin.cxx
diff --git a/np_sdk/prj/build.lst b/np_sdk/prj/build.lst
index 9617879118b5..cbdedcc5b704 100644
--- a/np_sdk/prj/build.lst
+++ b/np_sdk/prj/build.lst
@@ -1,3 +1,2 @@
np np_sdk : soltools NULL
-np np_sdk usr1 - all np_sdk NULL
-np np_sdk\mozsrc nmake - all np_mozsrc NULL
+np np_sdk\prj nmake - all np_prj NULL
diff --git a/np_sdk/prj/d.lst b/np_sdk/prj/d.lst
index ec0a6faed7ce..e69de29bb2d1 100644
--- a/np_sdk/prj/d.lst
+++ b/np_sdk/prj/d.lst
@@ -1,8 +0,0 @@
-mkdir: %_DEST%\inc\npsdk
-
-..\mozsrc\*.h %_DEST%\inc\npsdk\*.h
-..\inc\*.h %_DEST%\inc\npsdk\*.h
-
-..\%__SRC%\slo\npunix.o %_DEST%\lib\npunix.o
-..\%__SRC%\slo\npunix.obj %_DEST%\lib\npunix.obj
-..\%__SRC%\slo\npwin.obj %_DEST%\lib\npwin.obj
diff --git a/np_sdk/prj/makefile.mk b/np_sdk/prj/makefile.mk
new file mode 100644
index 000000000000..0997622e00f6
--- /dev/null
+++ b/np_sdk/prj/makefile.mk
@@ -0,0 +1 @@
+.INCLUDE : gbuildbridge.mk