Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, August 25, 2019

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

Revision 1.13, Sat Apr 24 14:03:11 2010 UTC (9 years, 4 months ago) by nepto


Changes since 1.12: +2 -1 lines

Added CPU related subroutines

# 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.12 2004-01-06 17:05:45 nepto Exp $

PACKAGE = @PACKAGE@
VERSION = @VERSION@

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

unexport SUBDIRS
unexport SOURCES
unexport HEADERS
unexport include_HEADERS
unexport OBJECTS
unexport MAIN_OBJECT
unexport SUBDIR_OBJECTS
unexport DEP_FILES

unexport noext_src_tmp
unexport noext_src

# Default settings {{{

noext_src_tmp = $(sort $(patsubst %.c,%,$(SOURCES)))
noext_src     = $(sort $(patsubst %.cpp,%,$(noext_src_tmp)))
OBJECTS          = $(sort $(patsubst %,%.o,$(noext_src)))
include_HEADERS  = $(sort $(patsubst %,%.h,$(noext_src)))
SUBDIR_OBJECTS   = $(sort $(patsubst %,%.o,$(SUBDIRS)))
DEP_FILES        = $(sort $(patsubst %,$(builddir)/.deps/%.P,$(noext_src)))

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

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

HEADERS =  $(include_HEADERS) $(noinst_HEADERS) $(CONFIG_HEADER)

# 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   = @CFLAGS@
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/compress/Makefile \
    $(top_builddir)/platon/cpu/Makefile \
    $(top_builddir)/platon/dsn/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:

# Object file dependencies {{{

static:        $(LIBSTATIC)

dynamic:    $(LIBDYNAMICV)

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

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

%.o: $(srcdir)/%.c $(srcdir)/%.h $(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 $(srcdir)/%.h $(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

$(MAIN_OBJECT): $(OBJECTS) $(SUBDIR_OBJECTS)
    $(LD) -r -o $@ $(OBJECTS) $(SUBDIR_OBJECTS)

# Object file dependencies }}}

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

# Install {{{

subdir-list-install   = $(sort $(patsubst %,_subdir_install_%,$(SUBDIRS)))
subdir-list-uninstall = $(sort $(patsubst %,_subdir_uninstall_%,$(SUBDIRS)))
install-subdirs   : dummy $(subdir-list-install)
uninstall-subdirs : dummy $(subdir-list-uninstall)

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

install: all installdirs install-subdirs \
    install-includeHEADERS \
    install-exec

uninstall: uninstall-subdirs \
    uninstall-includeHEADERS \
    uninstall-exec           \
    uninstalldirs

installcheck:
    @echo; echo; \
    echo "These files was installed to: "; \
    echo "    $(DESTDIR)$(libdir)"; \
    echo "    $(DESTDIR)$(includedir)"; \
    echo "    $(DESTDIR)$(includedir_platon)"; \
    echo "    $(DESTDIR)$(mandir)/man3"; \
    dashes="---------------------------------------------------------------"; \
    echo "$$dashes"; \
    find \
        $(DESTDIR)$(libdir) \
        $(DESTDIR)$(includedir) \
        $(DESTDIR)$(includedir_platon) \
        $(DESTDIR)$(mandir)/man3          -print ;\
    echo "$$dashes";

install-exec  :   install-lib
uninstall-exec: uninstall-lib

install-lib: $(install_LIB)
    @$(NORMAL_INSTALL)
    @$(mkinstalldirs) $(DESTDIR)$(libdir)
    @list='$(install_LIB)'; for p in $$list; do \
      if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
      echo "    Installing file $(DESTDIR)$(libdir)/$$p"; \
      $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libdir)/$$p; \
    done
uninstall-lib:
    @$(NORMAL_UNINSTALL)
    @list='$(install_LIB)'; for p in $$list; do \
      echo "    rm -f $(DESTDIR)$(libdir)/$$p"; \
      rm -f $(DESTDIR)$(libdir)/$$p; \
    done


install-strip:
    $(MAKE) AM_INSTALL_PROGRAM_FLAGS=-s install

installdirs:
    @$(mkinstalldirs) \
        $(DESTDIR)$(mandir)/man3 \
        $(DESTDIR)$(includedir_platon) \
        $(DESTDIR)$(libdir)

install-includeHEADERS: $(include_HEADERS)
    @$(NORMAL_INSTALL)
    @$(mkinstalldirs) $(DESTDIR)$(includedir_platon)
    @list='$(include_HEADERS)'; for p in $$list; do \
      if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
      echo "    Installing file $(DESTDIR)$(includedir_platon)/$$p"; \
      $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir_platon)/$$p; \
    done
uninstall-includeHEADERS:
    @$(NORMAL_UNINSTALL)
    @list='$(include_HEADERS)'; for p in $$list; do \
      echo "    rm -f $(DESTDIR)$(includedir)/$$p"; \
      rm -f $(DESTDIR)$(includedir)/$$p; \
      echo "    rm -f $(DESTDIR)$(includedir_platon)/$$p"; \
      rm -f $(DESTDIR)$(includedir_platon)/$$p; \
    done

install-symlinks:
    @$(NORMAL_INSTALL)
    @$(mkinstalldirs) $(DESTDIR)$(libdir)
    @$(mkinstalldirs) $(DESTDIR)$(includedir_platon)
    @list='$(include_HEADERS)'; for p in $$list; do \
      echo "    Creating symlink $(DESTDIR)$(includedir)/$$p"; \
      here=`pwd`; \
      cd  $(DESTDIR)$(includedir) && ( \
          $(LN_S) platon/$$p $$p; \
        $(LN_S) platon/$(include_SYMLINK) $(include_SYMLINK); \
        cd platon && $(LN_S) $$p $(include_SYMLINK); \
      ); \
      cd $$here; \
    done; \
    cd $(DESTDIR)$(libdir) && ( \
        echo "    Creating symlink $(DESTDIR)$(libdir)/$(LIBDYNAMIC)"; \
        $(LN_S) $(LIBDYNAMICV) $(LIBDYNAMIC); \
     );
uninstall-symlinks:
    @$(NORMAL_UNINSTALL)
    -@list='$(include_SYMLINK)'; for p in $$list; do \
      echo "    rm -f $(DESTDIR)$(includedir)/$$p"; \
      rm -f $(DESTDIR)$(includedir)/$$p; \
      echo "    rm -f $(DESTDIR)$(includedir_platon)/$$p"; \
      rm -f $(DESTDIR)$(includedir_platon)/$$p; \
    done; \
    cd $(DESTDIR)$(libdir) && ( \
        echo "    rm -f $(DESTDIR)$(libdir)/$(LIBDYNAMIC)"; \
        rm -f $(LIBDYNAMIC); \
     );

uninstall-dirs:
    @$(NORMAL_UNINSTALL)
    -rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir_platon)

# }}} Section: Install
 
# }}}

# 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