3 ## Copyright (C) 1996-2024 Free Software Foundation, Inc.
4 ## Written by Cygnus Support.
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 3 of the License, or
9 ## (at your option) any later version.
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ## GNU General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
19 nodist_
%C
%_libsim_a_SOURCES
= \
21 %C
%_libsim_a_SOURCES
= \
22 $(common_libcommon_a_SOURCES
)
23 %C
%_libsim_a_LIBADD
= \
25 $(patsubst %,%D
%/%,$(SIM_NEW_COMMON_OBJS
)) \
26 $(patsubst %,%D
%/dv-
%.o
,$(SIM_HW_DEVICES
)) \
31 $(%C
%_libsim_a_OBJECTS
) $(%C
%_libsim_a_LIBADD
): %D
%/hw-config.h
33 noinst_LIBRARIES
+= %D
%/libsim.a
35 ## Override wildcards that trigger common/modules.c to be (incorrectly) used.
36 %D
%/modules.o
: %D
%/modules.c
38 %D
%/%.o
: common
/%.c
; $(SIM_COMPILE
)
39 -@am__include@
%D
%/$(DEPDIR
)/*.Po
47 noinst_PROGRAMS
+= %D
%/run
49 ## List all generated headers to help Automake dependency tracking.
50 BUILT_SOURCES
+= %D
%/simops.h
52 %D
%/gencode
$(EXEEXT
) \
55 ## Generating modules.c requires all sources to scan.
56 %D
%/modules.c
: |
$(%C
%_BUILD_OUTPUTS
)
58 %C
%_gencode_SOURCES
= %D
%/gencode.c
59 %C
%_gencode_LDADD
= %D
%/d10v-opc.o
61 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
62 %D
%/gencode
$(EXEEXT
): $(%C
%_gencode_OBJECTS
) $(%C
%_gencode_DEPENDENCIES
) %D
%/$(am__dirstamp
)
63 $(AM_V_CCLD
)$(LINK_FOR_BUILD
) $(%C
%_gencode_OBJECTS
) $(%C
%_gencode_LDADD
)
65 # gencode is a build-time only tool. Override the default rules for it.
66 %D
%/gencode.o
: %D
%/gencode.c
67 $(AM_V_CC
)$(COMPILE_FOR_BUILD
) -c
$< -o
$@
68 %D
%/d10v-opc.o
: ..
/opcodes
/d10v-opc.c
69 $(AM_V_CC
)$(COMPILE_FOR_BUILD
) -c
$< -o
$@
71 %D
%/simops.h
: %D
%/gencode
$(EXEEXT
)
74 %D
%/table.c
: %D
%/gencode
$(EXEEXT
)
77 EXTRA_PROGRAMS
+= %D
%/gencode
78 CLEANFILES
+= %D
%/simops.h
79 MOSTLYCLEANFILES
+= $(%C
%_BUILD_OUTPUTS
)