Makefile.in Template for In-Tree Extensions

From CDOT Wiki
Revision as of 13:04, 1 April 2008 by David.humphrey (talk | contribs) (added Cesar's makefile.in to the wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

Cesar Oliveira has written a generic template usable for extensions, IDL interfaces, and C++/JS components.

Makefile.in

# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# 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. 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.
#
# The Original Code is ___COMPONENT____.
#
# The Initial Developer of the Original Code is
# ___YOUR_NAME___.
# Portions created by the Initial Developer are Copyright (C) 2___
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****

# Relative path to mozilla/ directory without trailing /
DEPTH       = ../..

topsrcdir   = @topsrcdir@
srcdir      = @srcdir@
VPATH       = @srcdir@

include $(DEPTH)/config/autoconf.mk

# Module name. same as the extension name if your building an extension.
#MODULE     =
# subdirectories you want make to traverse
#DIRs       =

### EXTENSION ###

# extension name. Same as module. Should be repeated in all Makefile.in files
# including component Makefile.in
#XPI_NAME    =

# extension id (same as install.rdf)
#INSTALL_EXTENSION_ID =

# (optional) Used if your building your extension in the tree. 
# Extension will be in mozilla/$(MOZ_OBJDIR)/dist/xpi-stage/
#XPI_PKGNAME =

# tell make to copy the file into the extension directory
#DIST_FILES  =

### INTERFACES (idl) ###

# name of the generated .xpt file. You will find it in
# mozilla/$(MOZ_OBJDIR)/dist/bin/components
#XPIDL_MODULE =

# name of the .idl files that will be run through xpidl
#XPIDLSRCS   = $(NULL)

# copies the files to mozilla/$(MOZ_OBJDIR)/dist/include/$(MODULE)/
# makes the components visible to other modules.
# All files here are header files.
#EXPORTS     = $(NULL)

### COMPONENTS ###

#IS_COMPONENT = 1

# Windows only option. Module should be linked against CRT statically
#USE_STATIC_LIBS = 1 | 0

# force building static library (?)
#FORCE_STATIC_LIB = 1 | 0

# additional preprocessor defines, -D, that is passed to the compiler
#DEFINES +=

# used for static builds and should match the NS_IMPL_NSGETMODULE call
#MODULE_NAME =

# Javascript XPCOM files
#EXTRA_COMPONENTS =

# Javascript XPCOM files that need to be preprocessed first
#EXTRA_PP_COMPONENTS =

# the name of the shared/static library. Will be lib*.so or *.dll
#LIBRARY_NAME =
#SHORT_LIBNAME = # define this as well if if library name > 8 characters long

# mozilla libraries that your component needs
#REQUIRES    = $(NULL)

# your C++ files that need to be run through a compiler
#CPPSRCS     =

# your C files that need to be run through a compiler
#CSRCS     =

# ??????
#SHARED_LIBRARY_LIBS = $(NULL)

### TESTS ###

# xpcshell tests
#ifdef ENABLE_TESTS
#DIRS        +=
#endif

# mochitests
#ifdef MOZ_MOCHITEST
#DIRS        +=
#endif

include $(topsrcdir)/config/rules.mk

# libraries that you need to link up against. Not needed for static libraries
#EXTRA_DSO_LDOPTS += $(NULL)

# extra include paths to pass to the compiler using -I (?)
#LOCAL_INCLUDES += $(NULL)

# include flags for .idl files (?)
#XPIDL_FLAGS +=

# ???????
#libs::

# REFERENCES
# Creating Custom Firefox Extensions with the Mozilla Build System
# http://developer.mozilla.org/en/docs/
#   Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System
# Building a component DLL
# http://developer.mozilla.org/en/docs/Building_a_component_DLL
# Adding XPCOM components to Mozilla build system
# http://developer.mozilla.org/en/docs/Adding_Components