Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, September 20, 2019

File: [Platon] / libplaton / Rules.make.in (download)

Revision 1.8, Tue Dec 3 16:56:36 2002 UTC (16 years, 9 months ago) by rajo

Changes since 1.7: +36 -23 lines

Building library.

# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# Make rules for libplaton library.
# $Platon: libplaton/Rules.make.in,v 1.7 2002/10/21 13:40:16 nepto Exp $

PACKAGE = @PACKAGE@
VERSION = @VERSION@

CVSTAG  = $(PACKAGE)-$(subst .,_,$(VERSION))

unexport SUBDIRS
unexport SOURCES
unexport HEADERS
unexport OBJECTS
unexport MAIN_OBJECT
unexport SUBDIR_OBJECTS

# Default settings {{{
LIBSTATIC          = $(PACKAGE).a
LIBDYNAMIC         = $(PACKAGE).so
LIBDYNAMICV        = $(PACKAGE).so.$(VERSION)

install_LIB        = $(LIBSTATIC) $(LIBDYNAMICV)
SCRIPTS            =

CONFIG_HEADER      = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = Makefile

# Default settings  }}}

# Programs {{{

SHELL   = @SHELL@

#ACLOCAL    = @ACLOCAL@
#AUTOCONF   = @AUTOCONF@
#AUTOMAKE   = @AUTOMAKE@
#AUTOHEADER = @AUTOHEADER@
ACLOCAL    = aclocal
AUTOCONF   = autoconf
AUTOMAKE   = automake
AUTOHEADER = autoheader


INSTALL         = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA    = @INSTALL_DATA@
INSTALL_SCRIPT  = @INSTALL_SCRIPT@
transform       = @program_transform_name@
mkinstalldirs   = $(SHELL) $(top_srcdir)/mkinstalldirs
LN_S            = @LN_S@
MAKEINFO        = @MAKEINFO@
RANLIB          = @RANLIB@
STRIP           = @STRIP@
AWK             = @AWK@
JADEWRAP        = @JADEWRAP@
DOXYGEN         = @DOXYGEN@
TAR             = tar
GZIP_ENV        = --best
NROFF           = nroff
DEPEND          = makedepend 

NORMAL_INSTALL   = :
PRE_INSTALL      = :
POST_INSTALL     = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL    = :
POST_UNINSTALL   = :

CC       = @CC@
CPP      = @CPP@
CXX      = @CXX@
CFLAGS   = -O2 -Wall -Wno-shadow -pedantic
CPPFLAGS = @CPPFLAGS@
LDFLAGS  = @LDFLAGS@
DEFS     = @DEFS@
INCLUDES = -I. -I$(top_srcdir) -I$(top_builddir)


COMPILE      = $(CC)  $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
COMPILE_CXX  = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
CCLD         = $(CC)
LINK         = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@

# }}} Programs

# Makefiles {{{
makefiles: \
    Makefile \
    $(top_builddir)/Rules.make \
    $(top_builddir)/Makefile \
    $(top_builddir)/doc/Makefile \
    $(top_builddir)/platon/html/Makefile \
    $(top_builddir)/platon/misc/Makefile \
    $(top_builddir)/platon/net/atlantis/Makefile \
    $(top_builddir)/platon/net/smtp/Makefile \
    $(top_builddir)/platon/net/pop3/Makefile \
    $(top_builddir)/platon/net/Makefile \
    $(top_builddir)/platon/str/Makefile \
    $(top_builddir)/platon/Makefile \
    $(top_builddir)/utils/Makefile
configure-scripts: $(top_builddir)/config.status \
    $(top_srcdir)/configure \
    $(top_builddir)/config.h  \
    $(top_srcdir)/config.h.in

$(top_builddir)/Rules.make: $(top_srcdir)/Rules.make.in  $(top_builddir)/config.status
    @cd $(top_builddir) \
      && CONFIG_FILES=Rules.make CONFIG_HEADERS= \
        $(SHELL) ./config.status

$(top_builddir)/%/Makefile: $(top_srcdir)/%/Makefile.in $(top_builddir)/Rules.make $(top_builddir)/config.status
    @cd $(top_builddir) \
      && CONFIG_FILES=`echo "$@" | sed 's%^$(top_builddir)/%%g;'` CONFIG_HEADERS= \
        $(SHELL) ./config.status

$(top_builddir)/config.status: $(top_srcdir)/configure.in
    @cd $(top_builddir) \
      && $(SHELL) ./config.status --recheck

$(top_srcdir)/configure: $(top_srcdir)/configure.in
    @here=`pwd`; \
    cd $(top_builddir) \
    && $(SHELL) ./config.status --recheck \
    && cd $$here && cd $(top_srcdir) \
    && $(AUTOCONF)

$(top_builddir)/config.h: $(top_srcdir)/config.h.in $(top_builddir)/config.status
    @cd $(top_builddir) \
      && CONFIG_FILES= CONFIG_HEADERS=config.h \
        $(SHELL) ./config.status \
          && touch config.h

$(top_srcdir)/config.h.in: $(top_srcdir)/configure.in
    @cd $(top_srcdir) \
      && $(AUTOHEADER) \
        && touch config.h.in

# Makefiles }}}

#
# A rule to do nothing
#
dummy:

#
# A rule to make subdirectories
#
subdir-list = $(sort $(patsubst %,_subdir_%,$(SUBDIRS)))
all-subdirs: dummy $(subdir-list)

ifdef SUBDIRS
$(subdir-list) : dummy
        $(MAKE) -C $(patsubst _subdir_%,%,$@)
endif

.SUFFIXES:

static:        $(LIBSTATIC)

dynamic:    $(LIBDYNAMICV)

$(LIBSTATIC):    $(OBJECTS)
    $(AR) r $@ $(OBJECTS)

$(LIBDYNAMICV):    $(OBJECTS)
    $(LD) $(LDFLAGS) -shared -o $@ $(OBJECTS)

%.o: $(srcdir)/%.c $(CONFIG_HEADER)
    @echo '$(COMPILE) -c $<'; \
    $(COMPILE) -Wp,-MD,.deps/$(*F).pp -o $@ -c $<
    @-cp .deps/$(*F).pp .deps/$(*F).P; \
    tr ' ' '\012' < .deps/$(*F).pp \
      | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
        >> .deps/$(*F).P; \
    rm .deps/$(*F).pp

%.o: $(srcdir)/%.cpp $(CONFIG_HEADER)
    @echo '$(COMPILE_CXX) -c $<'; \
    $(COMPILE_CXX) -Wp,-MD,.deps/$(*F).pp -o $@ -c $<
    @-cp .deps/$(*F).pp .deps/$(*F).P; \
    tr ' ' '\012' < .deps/$(*F).pp \
      | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
        >> .deps/$(*F).P; \
    rm .deps/$(*F).pp

SUBDIR_OBJECTS = $(sort $(patsubst %,%.o,$(SUBDIRS)))
$(MAIN_OBJECT): $(OBJECTS) $(SUBDIR_OBJECTS)
    $(LD) -r -o $@ $(OBJECTS) $(SUBDIR_OBJECTS)

test: $(top_builddir)/config.h
    $(CC) $(INCLUDES) -Wall -g -ggdb -DSELF_CFG -DDEBUG=1 -o test-$(PACKAGE) $(SOURCES)


info:
dvi:
check: all

.PHONY: doc
documentation:
    cd $(top_builddir)/doc && $(MAKE) clean all

# Section clean {{{
clean: clean-subdirs clean-hdr clean-tags clean-generic
    -rm -rf  *.o core *.core .deps lib*

subdir-list-clean = $(sort $(patsubst %,_subdir_clean_%,$(SUBDIRS)))
clean-subdirs: dummy $(subdir-list-clean)

ifdef SUBDIRS
$(subdir-list-clean) : dummy
        $(MAKE) -C $(patsubst _subdir_clean_%,%,$@) clean
endif

clean-hdr:
    -rm -f $(top_builddir)/config.h

clean-tags:
    -rm -f TAGS ID

clean-generic:


mostlyclean: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
    -rm -rf  *.o core *.core
    
mostlyclean-hdr:
    -rm -f $(top_builddir)/config.h

mostlyclean-tags:
    -rm -f TAGS ID

mostlyclean-generic:


maintainer-clean:  maintainer-clean-hdr maintainer-clean-tags \
        maintainer-clean-generic distclean
    @echo
    @echo "-----------------------------------------------------------"
    @echo "This command is intended for maintainers to use;"
    @echo "it deletes files that may require special tools to rebuild."
    @echo "-----------------------------------------------------------"
    @echo

maintainer-clean-generic:
    -rm -f $(top_builddir)/config.status $(top_srcdir)/configure
    -rm -f $(top_builddir)/$(PACKAGE)-*.tar.gz

maintainer-clean-tags:
    -rm -f TAGS ID

maintainer-clean-hdr:
    -rm -f $(top_builddir)/config.h


distclean: clean
    -rm -f Makefile

distclean-generic:

distclean-hdr:
    cd $(top_builddir) && $(MAKE) $@

# }}} Section clean

# Section: TAGS {{{

tags: TAGS
TAGS:  $(HEADERS) $(SOURCES)
    ctags --output=$@ $(HEADERS) $(SOURCES)

# }}}  Section: TAGS

# Section: distribution {{{
# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck:
    cd $(top_builddir) && $(MAKE) $@
dist-all:
    cd $(top_builddir) && $(MAKE) $@
dist:
    cd $(top_builddir) && $(MAKE) $@
distdir:
    cd $(top_builddir) && $(MAKE) $@
distdir-permisions:
    cd $(top_builddir) && $(MAKE) $@

# }}} Section: distribution
 
# PHONY {{{
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
install uninstall installdirs \
install-exec install-data \
install-man3 uninstall-man3 \
install-man  uninstall-man \
install-lib  uninstall-lib \
install-includeHEADERS uninstall-includeHEADERS \
tags mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info \
dvi check installcheck \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean \
tags TAGS
# }}} PHONY

.PHONY:    sources
sources:
    @echo $(SOURCES:%=cfg/%)

.PHONY: lclint
lclint:
    lclint ${DEFS} ${INCLUDES} ${SOURCES}

.PHONY: archive
archive: 
    @echo "This is $(PACKAGE)-$(VERSION)."
    @sleep 5
    @cvs -Q tag -F $(CVSTAG) .
    @rm -rf /tmp/$(PACKAGE)-$(VERSION) /tmp/$(PACKAGE)
    @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(PACKAGE) || :
    @mv /tmp/$(PACKAGE) /tmp/$(PACKAGE)-$(VERSION)
    @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh ; $(MAKE) depend; $(MAKE) distclean
    @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh --noconfigure
    @cd /tmp; tar czSpf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
    @rm -rf /tmp/$(PACKAGE)-$(VERSION)
    @cp /tmp/$(PACKAGE)-$(VERSION).tar.gz .
    @rm -f /tmp/$(PACKAGE)-$(VERSION).tar.gz 
    @echo " "
    @echo "The final archive is ./$(PACKAGE)-$(VERSION).tar.gz."

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:


# vim: ft=make
# vim600: fdm=marker fdc=3

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top