]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/bfin/local.mk
sim: common: move modules.c to source tracking
[thirdparty/binutils-gdb.git] / sim / bfin / local.mk
1 ## See sim/Makefile.am
2 ##
3 ## Copyright (C) 2005-2023 Free Software Foundation, Inc.
4 ## Written by Analog Devices, Inc.
5 ##
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.
10 ##
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.
15 ##
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/>.
18
19 AM_CPPFLAGS_%C% = $(SDL_CFLAGS)
20
21 nodist_%C%_libsim_a_SOURCES = \
22 %D%/modules.c
23 %C%_libsim_a_SOURCES = \
24 $(common_libcommon_a_SOURCES)
25 %C%_libsim_a_LIBADD = \
26 $(patsubst %,%D%/%,$(SIM_NEW_COMMON_OBJS)) \
27 $(patsubst %,%D%/dv-%.o,$(SIM_HW_DEVICES)) \
28 $(patsubst %,%D%/dv-%.o,$(%C%_SIM_EXTRA_HW_DEVICES)) \
29 %D%/bfin-sim.o \
30 %D%/devices.o \
31 %D%/gui.o \
32 %D%/interp.o \
33 %D%/machs.o \
34 %D%/sim-resume.o
35 $(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h
36
37 noinst_LIBRARIES += %D%/libsim.a
38
39 %D%/%.o: common/%.c ; $(SIM_COMPILE)
40 -@am__include@ %D%/$(DEPDIR)/*.Po
41
42 %C%_run_SOURCES =
43 %C%_run_LDADD = \
44 %D%/nrun.o \
45 %D%/libsim.a \
46 $(SIM_COMMON_LIBS)
47
48 noinst_PROGRAMS += %D%/run
49
50 %C%_SIM_EXTRA_HW_DEVICES = \
51 bfin_cec \
52 bfin_ctimer \
53 bfin_dma \
54 bfin_dmac \
55 bfin_ebiu_amc \
56 bfin_ebiu_ddrc \
57 bfin_ebiu_sdc \
58 bfin_emac \
59 bfin_eppi \
60 bfin_evt \
61 bfin_gpio \
62 bfin_gpio2 \
63 bfin_gptimer \
64 bfin_jtag \
65 bfin_mmu \
66 bfin_nfc \
67 bfin_otp \
68 bfin_pfmon \
69 bfin_pint \
70 bfin_pll \
71 bfin_ppi \
72 bfin_rtc \
73 bfin_sic \
74 bfin_spi \
75 bfin_trace \
76 bfin_twi \
77 bfin_uart \
78 bfin_uart2 \
79 bfin_wdog \
80 bfin_wp \
81 eth_phy
82
83 %D%/linux-fixed-code.h: @MAINT@ $(srcdir)/%D%/linux-fixed-code.s %D%/local.mk %D%/$(am__dirstamp)
84 $(AM_V_GEN)$(AS_FOR_TARGET_BFIN) $(srcdir)/%D%/linux-fixed-code.s -o %D%/linux-fixed-code.o
85 $(AM_V_at)(\
86 set -e; \
87 echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s. */"; \
88 echo "static const unsigned char bfin_linux_fixed_code[] ="; \
89 echo "{"; \
90 $(OBJDUMP_FOR_TARGET_BFIN) -d -z %D%/linux-fixed-code.o > $@.dis; \
91 sed -n \
92 -e 's:^[^ ]* :0x:' \
93 -e '/^0x/{s: .*::;s: *$$:,:;s: :, 0x:g;p;}' \
94 $@.dis; \
95 rm -f $@.dis; \
96 echo "};" \
97 ) > $@.tmp
98 $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(srcdir)/%D%/linux-fixed-code.h
99 $(AM_V_at)touch $(srcdir)/%D%/linux-fixed-code.h