Home | History | Annotate | Line # | Download | only in common
local.mk revision 1.1.1.1
      1  1.1  christos ## Copyright (C) 1997-2023 Free Software Foundation, Inc.
      2  1.1  christos ##
      3  1.1  christos ## This program is free software; you can redistribute it and/or modify
      4  1.1  christos ## it under the terms of the GNU General Public License as published by
      5  1.1  christos ## the Free Software Foundation; either version 3 of the License, or
      6  1.1  christos ## (at your option) any later version.
      7  1.1  christos ##
      8  1.1  christos ## This program is distributed in the hope that it will be useful,
      9  1.1  christos ## but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  1.1  christos ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11  1.1  christos ## GNU General Public License for more details.
     12  1.1  christos ##
     13  1.1  christos ## You should have received a copy of the GNU General Public License
     14  1.1  christos ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  1.1  christos 
     16  1.1  christos EXTRA_PROGRAMS += %D%/bits-gen
     17  1.1  christos 
     18  1.1  christos # We don't build this normally as it relies on the Berkeley SoftFloat/TestFloat
     19  1.1  christos # projects being installed/available first.
     20  1.1  christos EXTRA_PROGRAMS += %D%/fpu-tst
     21  1.1  christos 
     22  1.1  christos TESTS = \
     23  1.1  christos 	%D%/bits32m0 \
     24  1.1  christos 	%D%/bits32m31 \
     25  1.1  christos 	%D%/bits64m0 \
     26  1.1  christos 	%D%/bits64m63 \
     27  1.1  christos 	%D%/alu-tst
     28  1.1  christos check_PROGRAMS += $(TESTS)
     29  1.1  christos 
     30  1.1  christos %C%_CPPFLAGS = \
     31  1.1  christos 	-I$(srcdir)/common \
     32  1.1  christos 	-I$(srcroot)/include \
     33  1.1  christos 	-I../bfd
     34  1.1  christos 
     35  1.1  christos # These tests are build-time only tools.  Override the default rules for them.
     36  1.1  christos %D%/%.o: %D%/%.c
     37  1.1  christos 	$(AM_V_CC)$(COMPILE_FOR_BUILD) $(%C%_CPPFLAGS) -c $< -o $@
     38  1.1  christos 
     39  1.1  christos %D%/alu-tst$(EXEEXT): $(%C%_alu_tst_OBJECTS) $(%C%_alu_tst_DEPENDENCIES) %D%/$(am__dirstamp)
     40  1.1  christos 	$(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_alu_tst_OBJECTS) $(%C%_alu_tst_LDADD)
     41  1.1  christos 
     42  1.1  christos %D%/fpu-tst$(EXEEXT): $(%C%_fpu_tst_OBJECTS) $(%C%_fpu_tst_DEPENDENCIES) %D%/$(am__dirstamp)
     43  1.1  christos 	$(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_fpu_tst_OBJECTS) $(%C%_fpu_tst_LDADD)
     44  1.1  christos 
     45  1.1  christos %D%/bits-gen$(EXEEXT): $(%C%_bits_gen_OBJECTS) $(%C%_bits_gen_DEPENDENCIES) %D%/$(am__dirstamp)
     46  1.1  christos 	$(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits_gen_OBJECTS) $(%C%_bits_gen_LDADD)
     47  1.1  christos 
     48  1.1  christos %D%/bits32m0$(EXEEXT): $(%C%_bits32m0_OBJECTS) $(%C%_bits32m0_DEPENDENCIES) %D%/$(am__dirstamp)
     49  1.1  christos 	$(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits32m0_OBJECTS) $(%C%_bits32m0_LDADD)
     50  1.1  christos 
     51  1.1  christos %D%/bits32m0.c: %D%/bits-gen$(EXEEXT) %D%/bits-tst.c
     52  1.1  christos 	$(AM_V_GEN)$< 32 0 big > $@.tmp
     53  1.1  christos 	$(AM_V_at)cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
     54  1.1  christos 	$(AM_V_at)mv $@.tmp $@
     55  1.1  christos 
     56  1.1  christos %D%/bits32m31$(EXEEXT): $(%C%_bits32m31_OBJECTS) $(%C%_bits32m31_DEPENDENCIES) %D%/$(am__dirstamp)
     57  1.1  christos 	$(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits32m31_OBJECTS) $(%C%_bits32m31_LDADD)
     58  1.1  christos 
     59  1.1  christos %D%/bits32m31.c: %D%/bits-gen$(EXEEXT) %D%/bits-tst.c
     60  1.1  christos 	$(AM_V_GEN)$< 32 31 little > $@.tmp
     61  1.1  christos 	$(AM_V_at)cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
     62  1.1  christos 	$(AM_V_at)mv $@.tmp $@
     63  1.1  christos 
     64  1.1  christos %D%/bits64m0$(EXEEXT): $(%C%_bits64m0_OBJECTS) $(%C%_bits64m0_DEPENDENCIES) %D%/$(am__dirstamp)
     65  1.1  christos 	$(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits64m0_OBJECTS) $(%C%_bits64m0_LDADD)
     66  1.1  christos 
     67  1.1  christos %D%/bits64m0.c: %D%/bits-gen$(EXEEXT) %D%/bits-tst.c
     68  1.1  christos 	$(AM_V_GEN)$< 64 0 big > $@.tmp
     69  1.1  christos 	$(AM_V_at)cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
     70  1.1  christos 	$(AM_V_at)mv $@.tmp $@
     71  1.1  christos 
     72  1.1  christos %D%/bits64m63$(EXEEXT): $(%C%_bits64m63_OBJECTS) $(%C%_bits64m63_DEPENDENCIES) %D%/$(am__dirstamp)
     73  1.1  christos 	$(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_bits64m63_OBJECTS) $(%C%_bits64m63_LDADD)
     74  1.1  christos 
     75  1.1  christos %D%/bits64m63.c: %D%/bits-gen$(EXEEXT) %D%/bits-tst.c
     76  1.1  christos 	$(AM_V_GEN)$< 64 63 little > $@.tmp
     77  1.1  christos 	$(AM_V_at)cat $(srcdir)/%D%/bits-tst.c >> $@.tmp
     78  1.1  christos 	$(AM_V_at)mv $@.tmp $@
     79  1.1  christos 
     80  1.1  christos CLEANFILES += \
     81  1.1  christos 	%D%/bits-gen \
     82  1.1  christos 	%D%/bits32m0.c \
     83  1.1  christos 	%D%/bits32m31.c \
     84  1.1  christos 	%D%/bits64m0.c \
     85  1.1  christos 	%D%/bits64m63.c
     86