Debian Codegraph @

stable/CMakeLists.txt

raw
1 # dynamips - stable code + tools
2
3 set ( COMMON "${CMAKE_SOURCE_DIR}/common" )
4 set ( LOCAL "${CMAKE_CURRENT_SOURCE_DIR}" )
5 include_directories ( "${CMAKE_CURRENT_SOURCE_DIR}" "${COMMON}" "${CMAKE_CURRENT_BINARY_DIR}" )
6
7 # udp_send
8 if ( BUILD_UDP_SEND )
9 add_executable ( udp_send
10 "${COMMON}/crc.c"
11 "${COMMON}/net.c"
12 "${COMMON}/udp_send.c"
13 "${COMMON}/utils.c"
14 )
15 target_link_libraries ( udp_send ${DYNAMIPS_LIBRARIES} )
16 install_executable ( udp_send )
17 endif ( BUILD_UDP_SEND )
18
19 # udp_recv
20 if ( BUILD_UDP_RECV )
21 add_executable ( udp_recv
22 "${COMMON}/crc.c"
23 "${COMMON}/net.c"
24 "${COMMON}/udp_recv.c"
25 "${COMMON}/utils.c"
26 )
27 target_link_libraries ( udp_recv ${DYNAMIPS_LIBRARIES} )
28 install_executable ( udp_recv )
29 endif ( BUILD_UDP_RECV )
30
31 # rom2c
32 # XXX must be built for the host, not target, to support cross-compiling
33 add_executable ( rom2c EXCLUDE_FROM_ALL
34 "${COMMON}/rom2c.c"
35 )
36 target_link_libraries ( rom2c ${DYNAMIPS_LIBRARIES} )
37 set ( ROM2C_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/rom2c${CMAKE_EXECUTABLE_SUFFIX}" CACHE INTERNAL "rom2c executable" )
38
39 # mips64_microcode_dump.inc
40 set ( _input "${LOCAL}/mips64_microcode" )
41 set ( _output "${CMAKE_CURRENT_BINARY_DIR}/mips64_microcode_dump.inc" )
42 add_custom_command (
43 OUTPUT ${_output}
44 COMMAND ${ROM2C_EXECUTABLE} ARGS ${_input} ${_output} 0xbfc00000
45 DEPENDS rom2c ${_input}
46 )
47 add_custom_target ( mips64_microcode_dump_stable
48 DEPENDS ${_output}
49 )
50
51 # ppc32_microcode_dump.inc
52 set ( _input "${LOCAL}/ppc32_microcode" )
53 set ( _output "${CMAKE_CURRENT_BINARY_DIR}/ppc32_microcode_dump.inc" )
54 add_custom_command (
55 OUTPUT ${_output}
56 COMMAND ${ROM2C_EXECUTABLE} ARGS ${_input} ${_output} 0xfff00000
57 DEPENDS rom2c ${_input}
58 )
59 add_custom_target ( ppc32_microcode_dump_stable
60 DEPENDS ${_output}
61 )
62
63 # nvram_export
64 if ( BUILD_NVRAM_EXPORT )
65 add_executable ( nvram_export
66 "${COMMON}/fs_nvram.c"
67 "${COMMON}/nvram_export.c"
68 )
69 target_link_libraries ( nvram_export ${DYNAMIPS_LIBRARIES} )
70 install_executable ( nvram_export )
71 endif ( BUILD_NVRAM_EXPORT )
72
73 #-----------------------#
74 # dynamips: stable code #
75 #-----------------------#
76
77 if ( NOT BUILD_DYNAMIPS_STABLE )
78 return ()
79 endif ( NOT BUILD_DYNAMIPS_STABLE )
80
81 # set MAC64HACK on stable OSX amd64 build
82 if ( APPLE AND "amd64" STREQUAL "${DYNAMIPS_ARCH}" )
83 add_definitions( "-DMAC64HACK" )
84 endif()
85
86
87 # dynamips_*_stable
88 set ( _files
89 "${COMMON}/mempool.c"
90 "${COMMON}/registry.c"
91 "${COMMON}/rbtree.c"
92 "${COMMON}/hash.c"
93 "${COMMON}/sbox.c"
94 "${COMMON}/utils.c"
95 "${COMMON}/parser.c"
96 "${COMMON}/plugin.c"
97 "${COMMON}/ptask.c"
98 "${COMMON}/timer.c"
99 "${COMMON}/crc.c"
100 "${COMMON}/base64.c"
101 "${COMMON}/net.c"
102 "${COMMON}/net_io.c"
103 "${COMMON}/net_io_bridge.c"
104 "${COMMON}/net_io_filter.c"
105 "${COMMON}/atm.c"
106 "${COMMON}/atm_vsar.c"
107 "${COMMON}/atm_bridge.c"
108 "${COMMON}/frame_relay.c"
109 "${COMMON}/eth_switch.c"
110 "${COMMON}/dynamips.c"
111 "${COMMON}/insn_lookup.c"
112 "${LOCAL}/vm.c"
113 "${LOCAL}/cpu.c"
114 "${COMMON}/jit_op.c"
115 "${LOCAL}/mips64.c"
116 "${LOCAL}/mips64_mem.c"
117 "${LOCAL}/mips64_cp0.c"
118 "${LOCAL}/mips64_jit.c"
119 "${LOCAL}/mips64_exec.c"
120 "${LOCAL}/ppc32.c"
121 "${LOCAL}/ppc32_mem.c"
122 "${LOCAL}/ppc32_jit.c"
123 "${LOCAL}/ppc32_exec.c"
124 "${LOCAL}/ppc32_vmtest.c"
125 "${COMMON}/memory.c"
126 "${COMMON}/device.c"
127 "${COMMON}/nmc93cX6.c"
128 "${COMMON}/cisco_eeprom.c"
129 "${COMMON}/cisco_card.c"
130 "${COMMON}/pci_dev.c"
131 "${COMMON}/pci_io.c"
132 "${COMMON}/dev_zero.c"
133 "${COMMON}/dev_bswap.c"
134 "${COMMON}/dev_vtty.c"
135 "${COMMON}/dev_ram.c"
136 "${COMMON}/dev_rom.c"
137 "${COMMON}/dev_nvram.c"
138 "${COMMON}/dev_bootflash.c"
139 "${COMMON}/dev_flash.c"
140 "${COMMON}/dev_mpc860.c"
141 "${COMMON}/dev_ds1620.c"
142 "${COMMON}/dev_remote.c"
143 "${COMMON}/dev_clpd6729.c"
144 "${COMMON}/dev_pcmcia_disk.c"
145 "${COMMON}/dev_gt.c"
146 "${COMMON}/dev_mv64460.c"
147 "${COMMON}/dev_plx.c"
148 "${COMMON}/dev_dec21x50.c"
149 "${COMMON}/dev_pericom.c"
150 "${COMMON}/dev_ti2050b.c"
151 "${COMMON}/dev_ap1011.c"
152 "${COMMON}/dev_plx6520cb.c"
153 "${COMMON}/dev_ns16552.c"
154 "${COMMON}/dev_dec21140.c"
155 "${COMMON}/dev_am79c971.c"
156 "${COMMON}/dev_i8254x.c"
157 "${COMMON}/dev_i8255x.c"
158 "${COMMON}/dev_mueslix.c"
159 "${COMMON}/dev_wic_serial.c"
160 "${COMMON}/dev_c3600.c"
161 "${COMMON}/dev_c3600_bay.c"
162 "${COMMON}/dev_c3600_iofpga.c"
163 "${COMMON}/dev_c3600_eth.c"
164 "${COMMON}/dev_c3600_serial.c"
165 "${COMMON}/dev_c7200.c"
166 "${COMMON}/dev_c7200_iofpga.c"
167 "${COMMON}/dev_c7200_mpfpga.c"
168 "${COMMON}/dev_c7200_sram.c"
169 "${COMMON}/dev_c7200_eth.c"
170 "${COMMON}/dev_c7200_serial.c"
171 "${COMMON}/dev_c7200_pos.c"
172 "${COMMON}/dev_c7200_bri.c"
173 "${COMMON}/dev_c7200_jcpa.c"
174 "${COMMON}/dev_c2691.c"
175 "${COMMON}/dev_c2691_iofpga.c"
176 "${COMMON}/dev_c2691_eth.c"
177 "${COMMON}/dev_c2691_serial.c"
178 "${COMMON}/dev_c2691_wic.c"
179 "${COMMON}/dev_c2691_pcmod.c"
180 "${COMMON}/dev_c3725.c"
181 "${COMMON}/dev_c3725_iofpga.c"
182 "${COMMON}/dev_c3725_eth.c"
183 "${COMMON}/dev_c3725_serial.c"
184 "${COMMON}/dev_c3725_wic.c"
185 "${COMMON}/dev_c3725_pcmod.c"
186 "${COMMON}/dev_c3745.c"
187 "${COMMON}/dev_c3745_iofpga.c"
188 "${COMMON}/dev_c3745_eth.c"
189 "${COMMON}/dev_c3745_serial.c"
190 "${COMMON}/dev_c3745_wic.c"
191 "${COMMON}/dev_c3745_pcmod.c"
192 "${COMMON}/dev_c2600.c"
193 "${COMMON}/dev_c2600_pci.c"
194 "${COMMON}/dev_c2600_iofpga.c"
195 "${COMMON}/dev_c2600_eth.c"
196 "${COMMON}/dev_c2600_pcmod.c"
197 "${COMMON}/dev_c2600_wic.c"
198 "${COMMON}/dev_c1700.c"
199 "${COMMON}/dev_c1700_iofpga.c"
200 "${COMMON}/dev_c1700_eth.c"
201 "${COMMON}/dev_c1700_wic.c"
202 "${COMMON}/dev_c6msfc1.c"
203 "${COMMON}/dev_c6msfc1_iofpga.c"
204 "${COMMON}/dev_c6msfc1_mpfpga.c"
205 "${COMMON}/dev_c6sup1.c"
206 "${COMMON}/dev_c6sup1_iofpga.c"
207 "${COMMON}/dev_c6sup1_mpfpga.c"
208 "${COMMON}/dev_nm_16esw.c"
209 "${COMMON}/dev_pa_a1.c"
210 "${COMMON}/dev_pa_mc8te1.c"
211 "${COMMON}/dev_sb1.c"
212 "${COMMON}/dev_sb1_io.c"
213 "${COMMON}/dev_sb1_pci.c"
214 "${LOCAL}/hypervisor.c"
215 "${COMMON}/hv_nio.c"
216 "${COMMON}/hv_nio_bridge.c"
217 "${COMMON}/hv_frsw.c"
218 "${COMMON}/hv_atmsw.c"
219 "${COMMON}/hv_atm_bridge.c"
220 "${COMMON}/hv_ethsw.c"
221 "${LOCAL}/hv_vm.c"
222 "${COMMON}/hv_vm_debug.c"
223 "${COMMON}/hv_store.c"
224 "${COMMON}/hv_c7200.c"
225 "${COMMON}/hv_c3600.c"
226 "${COMMON}/hv_c2691.c"
227 "${COMMON}/hv_c3725.c"
228 "${COMMON}/hv_c3745.c"
229 "${COMMON}/hv_c2600.c"
230 "${COMMON}/hv_c1700.c"
231 "${COMMON}/rommon_var.c"
232 "${COMMON}/get_cpu_time.c"
233 "${COMMON}/fs_fat.c"
234 "${COMMON}/fs_mbr.c"
235 "${COMMON}/fs_nvram.c"
236 "${COMMON}/dev_lxt970a.c"
237 )
238 if ( ENABLE_LINUX_ETH )
239 set ( _files ${_files} "${COMMON}/linux_eth.c" )
240 endif ( ENABLE_LINUX_ETH )
241 if ( ENABLE_GEN_ETH )
242 set ( _files ${_files} "${COMMON}/gen_eth.c" )
243 endif ( ENABLE_GEN_ETH )
244 set ( _dependencies ppc32_microcode_dump_stable mips64_microcode_dump_stable )
245
246 # dynamips_amd64_stable
247 if ( "amd64" STREQUAL "${DYNAMIPS_ARCH}" )
248 add_executable ( dynamips_amd64_stable
249 ${_files}
250 "${LOCAL}/mips64_amd64_trans.c"
251 "${LOCAL}/ppc32_amd64_trans.c"
252 )
253 add_dependencies ( dynamips_amd64_stable ${_dependencies} )
254 target_link_libraries ( dynamips_amd64_stable ${DYNAMIPS_LIBRARIES} )
255 maybe_rename_to_dynamips ( dynamips_amd64_stable )
256 install_executable ( dynamips_amd64_stable )
257 endif ()
258
259 # dynamips_x86_stable
260 if ( "x86" STREQUAL "${DYNAMIPS_ARCH}" )
261 add_executable ( dynamips_x86_stable
262 ${_files}
263 "${LOCAL}/mips64_x86_trans.c"
264 "${LOCAL}/ppc32_x86_trans.c"
265 )
266 add_dependencies ( dynamips_x86_stable ${_dependencies} )
267 target_link_libraries ( dynamips_x86_stable ${DYNAMIPS_LIBRARIES} )
268 maybe_rename_to_dynamips ( dynamips_x86_stable )
269 install_executable ( dynamips_x86_stable )
270 endif ()
271
272 # dynamips_nojit_stable
273 if ( "nojit" STREQUAL "${DYNAMIPS_ARCH}" )
274 add_executable ( dynamips_nojit_stable
275 ${_files}
276 "${LOCAL}/mips64_nojit_trans.c"
277 "${COMMON}/ppc32_nojit_trans.c"
278 )
279 add_dependencies ( dynamips_nojit_stable ${_dependencies} )
280 target_link_libraries ( dynamips_nojit_stable ${DYNAMIPS_LIBRARIES} )
281 maybe_rename_to_dynamips ( dynamips_nojit_stable )
282 install_executable ( dynamips_nojit_stable )
283 endif ()