2 # GCC makefile fragment for MeP
3 # Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009
4 # Free Software Foundation, Inc.
5 # Contributed by Red Hat Inc
7 # This file is part of GCC.
9 # GCC is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3, or (at your option)
14 # GCC is distributed in the hope that it will be useful, but WITHOUT
15 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 # License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GCC; see the file COPYING3. If not see
21 # <http://www.gnu.org/licenses/>. */
23 # Force genpreds to be rebuilt in case MeP-Integrator changed the predicates
25 GTM_H = tm.h $(tm_file_list) $(srcdir)/config/mep/mep-intrin.h
27 # Use -O0 instead of -O2 so we don't get complex relocations
29 CRTSTUFF_CFLAGS = -O0 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
30 -finhibit-size-directive -fno-inline-functions -fno-exceptions \
31 -fno-zero-initialized-in-bss -fno-unit-at-a-time
35 mep-pragma.o: $(srcdir)/config/mep/mep-pragma.c $(CONFIG_H) $(SYSTEM_H) \
36 coretypes.h $(TM_H) $(TREE_H) $(RTL_H) toplev.h c-pragma.h \
37 $(CPPLIB_H) hard-reg-set.h output.h $(srcdir)/config/mep/mep-protos.h \
38 function.h insn-config.h reload.h $(TARGET_H)
39 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
43 LIB1ASMSRC = mep/mep-lib1.asm
45 LIB1ASMFUNCS = _mep_profile \
51 # multiply and divide routines
54 $(srcdir)/config/mep/mep-lib2.c \
55 $(srcdir)/config/mep/mep-tramp.c
57 # floating point emulation libraries
62 fp-bit.c: $(srcdir)/config/fp-bit.c
63 echo '#define FLOAT' > fp-bit.c
64 cat $(srcdir)/config/fp-bit.c >> fp-bit.c
66 dp-bit.c: $(srcdir)/config/fp-bit.c
67 cat $(srcdir)/config/fp-bit.c > dp-bit.c
69 MULTILIB_OPTIONS = mel mall-opts mfar
70 MULTILIB_DIRNAMES = el allopt far
72 EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
75 $(srcdir)/config/mep/intrinsics.md \
76 $(srcdir)/config/mep/predicates.md \
77 $(srcdir)/config/mep/constraints.md
79 mep.o : $(srcdir)/config/mep/mep-intrin.h
83 MEP_COPRO = ext_cop1_16,ext_cop1_32,ext_cop1_48,ext_cop1_64
86 # To use this, you must have cgen and cgen/cpu in the same source tree as
89 S=`cd $(srcdir); pwd`; \
90 cd $$S/config/mep && \
91 guile -s $$S/../cgen/cgen-intrinsics.scm \
94 -a $$S/../cgen/cpu/mep.cpu \
96 -i mep,$(MEP_CORE),$(MEP_COPRO) \
97 -K mep,$(MEP_CORE),$(MEP_COPRO) \
102 # start-extra-headers
103 EXTRA_HEADERS = $(srcdir)/config/mep/intrinsics.h \
104 $(srcdir)/config/mep/default.h