Annotation of Gnu-Mach/Makefile.am, revision 1.1.1.3

1.1       root        1: # Makefile for GNU Mach.
                      2: 
                      3: # Copyright (C) 2006, 2007, 2008, 2009, 2013 Free Software Foundation, Inc.
                      4: 
                      5: # This program is free software; you can redistribute it and/or modify it
                      6: # under the terms of the GNU General Public License as published by the
                      7: # Free Software Foundation; either version 2, or (at your option) any later
                      8: # version.
                      9: # 
                     10: # This program is distributed in the hope that it will be useful, but
                     11: # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     12: # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     13: # for more details.
                     14: # 
                     15: # You should have received a copy of the GNU General Public License along
                     16: # with this program; if not, write to the Free Software Foundation, Inc.,
                     17: # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
                     18: 
                     19: #
                     20: # Various definitions of the Automake environment.
                     21: #
                     22: # These will be augmented below.
                     23: #
                     24: 
                     25: SUBDIRS =
                     26: DIST_SUBDIRS =
                     27: EXTRA_DIST =
                     28: DISTCHECK_CONFIGURE_FLAGS =
                     29: noinst_LIBRARIES =
                     30: noinst_PROGRAMS =
                     31: TESTS=
                     32: info_TEXINFOS =
                     33: MOSTLYCLEANFILES =
                     34: DISTCLEANFILES =
                     35: AM_CPPFLAGS =
                     36: AM_CCASFLAGS =
                     37: AM_CFLAGS =
                     38: AM_LDFLAGS =
                     39: 
                     40: #
                     41: # Compilation flags
                     42: #
                     43: 
                     44: AM_CPPFLAGS += \
                     45:        -nostdinc -imacros config.h
                     46: 
                     47: AM_CPPFLAGS += \
                     48:        -I$(systype) \
                     49:        -I. \
                     50:        -I$(top_srcdir)/$(systype) \
                     51:        -I$(top_srcdir)/$(systype)/include/mach/sa \
                     52:        -I$(top_srcdir)/include
                     53: 
                     54: AM_CFLAGS += \
                     55:        -fno-builtin-log
                     56: 
                     57: # Yes, this makes the eyes hurt.  But perhaps someone will finally take care of
                     58: # all that scruffy Mach code...  Also see <http://savannah.gnu.org/task/?5726>.
                     59: AM_CFLAGS += \
                     60:        -Wall
                     61: 
1.1.1.3 ! root       62: # We need the GNU-style inline
1.1       root       63: AM_CFLAGS += \
1.1.1.3 ! root       64:        -fgnu89-inline
1.1       root       65: 
                     66: # The smashing stack protector might be enabled by default, but might emit
                     67: # unsuitable code.
                     68: if disable_smashing_stack_protector
                     69: AM_CFLAGS += \
                     70:        -fno-stack-protector
                     71: endif
                     72: 
                     73: #
                     74: # Silent build support.
                     75: #
                     76: 
                     77: AWK_V = $(AWK_V_$(V))
                     78: AWK_V_ = $(AWK_V_$(AM_DEFAULT_VERBOSITY))
                     79: AWK_V_0 = @echo "  AWK    $@";
                     80: 
                     81: GZIP_V = $(GZIP_V_$(V))
                     82: GZIP_V_ = $(GZIP_V_$(AM_DEFAULT_VERBOSITY))
                     83: GZIP_V_0 = @echo "  GZIP   $@";
                     84: 
                     85: NM_V = $(NM_V_$(V))
                     86: NM_V_ = $(NM_V_$(AM_DEFAULT_VERBOSITY))
                     87: NM_V_0 = @echo "  NM     $@";
                     88: 
                     89: MIGCOM_V = $(MIGCOM_V_$(V))
                     90: MIGCOM_V_ = $(MIGCOM_V_$(AM_DEFAULT_VERBOSITY))
                     91: MIGCOM_V_0 = @echo "  MIG    $@";
                     92: 
                     93: #
                     94: # MIG Setup.
                     95: #
                     96: 
                     97: # MIGCOM.
                     98: MIGCOM = $(MIG) -n -cc cat - /dev/null
                     99: 
                    100: # We need this because we use $(CPP) to preprocess MIG .defs files.
                    101: CPP = @CPP@ -x c
                    102: 
                    103: #
                    104: # Other Tools' Configuration.
                    105: #
                    106: 
1.1.1.2   root      107: # Don't needlessly overwrite files whose contents haven't changed.
                    108: # This helps avoiding unnecessary recompilation cycles when keeping
1.1       root      109: # cross-compilation toolchains up-to-date.  Thus, unconditionally use the
                    110: # `install-sh' that is supplied by GNU Automake 1.10.1, as the GNU Coreutils
                    111: # one doesn't provide this functionality yet (TODO: change that).  TODO:
                    112: # `build-aux' is hardcoded.
                    113: install_sh = $(SHELL) $(abs_srcdir)/build-aux/install-sh -C
                    114: INSTALL = $(install_sh)
                    115: 
                    116: #
                    117: # The main kernel functionality.
                    118: #
                    119: 
                    120: noinst_LIBRARIES += \
                    121:        libkernel.a
                    122: libkernel_a_SOURCES =
                    123: nodist_libkernel_a_SOURCES =
                    124: MOSTLYCLEANFILES += \
                    125:        $(nodist_libkernel_a_SOURCES)
                    126: 
                    127: gnumach_o_LDADD = \
                    128:        libkernel.a
                    129: 
                    130: gnumach_SOURCES =
                    131: gnumach_LINKFLAGS =
                    132: 
                    133: # Makerules: how to do some things.
                    134: include Makerules.am
                    135: 
                    136: # Main Makefile fragment.
                    137: include Makefrag.am
                    138: 
                    139: # Test suite.
                    140: include tests/Makefrag.am
                    141: 
                    142: # Documentation.
                    143: include doc/Makefrag.am
                    144: 
                    145: #
                    146: # Kernel Image
                    147: #
                    148: 
                    149: # We need the following junk because of the include-files-from-libc.a magic.
                    150: # TODO.  Is the following kosher from a Automake point of view?  (I.e. a
                    151: # program `gnumach.o' that is then later used again as an object file.)
                    152: gnumach_o_SOURCES =
                    153: # TODO.  ``-u _start''.  System dependent?
                    154: gnumach_o_LINK = $(LD) -u _start -r -o $@
                    155: noinst_PROGRAMS += \
                    156:        gnumach.o
                    157: 
                    158: # This is the list of routines we decide is OK to steal from the C library.
                    159: clib_routines := memcmp memcpy memmove                         \
                    160:                 strchr strstr strsep strtok                    \
                    161:                 htonl htons ntohl ntohs                        \
1.1.1.3 ! root      162:                 udivdi3 __udivdi3 __umoddi3                    \
1.1       root      163:                 __rel_iplt_start __rel_iplt_end                \
1.1.1.3 ! root      164:                 __ffsdi2                                       \
1.1       root      165:                 _START _start etext _edata end _end # actually ld magic, not libc.
                    166: gnumach-undef: gnumach.$(OBJEXT)
                    167:        $(NM_V) $(NM) -u $< | sed 's/  *U  *//' | sort -u > $@
                    168: MOSTLYCLEANFILES += gnumach-undef
                    169: gnumach-undef-bad: gnumach-undef Makefile
                    170:        $(AM_V_GEN) sed '$(foreach r,$(clib_routines),/^$r$$/d;)' $< > $@
                    171: MOSTLYCLEANFILES += gnumach-undef-bad
                    172: clib-routines.o: gnumach-undef gnumach-undef-bad
                    173:        $(AM_V_at) if test -s gnumach-undef-bad; \
                    174:        then cat gnumach-undef-bad; exit 2; else true; fi
                    175:        $(AM_V_CCLD) $(CCLD) -nostdlib -nostartfiles -r -static \
                    176:          -o $@ `sed 's/^/-Wl,-u,/' < $<` -x c /dev/null -lc -lgcc
1.1.1.2   root      177:        @if nm $@ | grep __init_cpu_features; \
                    178:        then echo "Please install a 32bit libc without multiarch support (on Debian systems, the libc6-dev:i386 package containing /usr/lib/i386-linux-gnu/libc.a)". ; \
                    179:        false ; fi
1.1       root      180: 
                    181: gnumach_LINK = $(LD) $(LINKFLAGS) $(gnumach_LINKFLAGS) -o $@
                    182: gnumach_LDADD = gnumach.o clib-routines.o
                    183: 
                    184: #
                    185: # Installation.
                    186: #
                    187: 
                    188: exec_bootdir = \
                    189:        $(exec_prefix)/boot
                    190: exec_boot_PROGRAMS = \
                    191:        gnumach
                    192: 
                    193: #
                    194: # Building a distribution.
                    195: #
                    196: 
                    197: EXTRA_DIST += \
                    198:        config.status.dep.patch
                    199: 
                    200: EXTRA_DIST += \
                    201:        DEVELOPMENT
                    202: 
                    203: dist-hook: dist-rm-CVS gen-ChangeLog
                    204: 
                    205: .PHONY: dist-rm-CVS
                    206: dist-rm-CVS:
                    207: # Try to be very safe with respect to spuriously removing various directories
                    208: # in case of an error.
                    209:        find $(distdir)/ -type d -name CVS | while read d; do   \
                    210:          rm -f "$$d"/{Entries,Repository,Root,Tag} &&          \
                    211:          rmdir "$$d";                                          \
                    212:        done
                    213: 
                    214: gen_start_commit = e227045b06d62ee7d2fbab9d5ade9030ff43170b
                    215: ChangeLog_files = ChangeLog ChangeLog.0 ChangeLog.00
                    216: .PHONY: gen-ChangeLog
                    217: gen-ChangeLog:
                    218:        $(AM_V_GEN)if test -d $(top_srcdir)/.git; then                  \
                    219:          (cd $(top_srcdir)/ &&                                         \
                    220:          ./gitlog-to-changelog --strip-tab                             \
                    221:            $(gen_start_commit).. &&                                    \
                    222:          echo) >> $(distdir)/cl-t &&                                   \
                    223:          for f in $(ChangeLog_files); do                               \
                    224:            (cd $(top_srcdir)/ &&                                       \
                    225:            git show $(gen_start_commit):$$f) >> $(distdir)/cl-t &&     \
                    226:            rm -f $(distdir)/$$f &&                                     \
                    227:            mv $(distdir)/cl-t $(distdir)/$$f                           \
                    228:            || exit $$?;                                                \
                    229:          done;                                                         \
                    230:        fi
                    231: 
                    232: DISTCLEANFILES += \
                    233:        Makefile.orig \
                    234:        config.status.orig
                    235: 
                    236: #
                    237: # Legacy support.
                    238: #
                    239: 
                    240: install-headers: install-data
                    241:        @echo '*****************************************************'
                    242:        @echo '* As you can see above, I was so kind to rewrite your'
                    243:        @echo '* `make $@'\'
                    244:        @echo '* into'
                    245:        @echo '* `make $^'\'
                    246:        @echo '* which is how it is to be spelled these days.'
                    247:        @echo '*'
                    248:        @echo '* Please get your instructions fixed.'
                    249:        @echo '*****************************************************'
                    250:        @echo
                    251:        @echo 'Penalty:'
                    252:        sleep 20

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.