18d7f2e76SPhilippe Mathieu-Daudé /*
28d7f2e76SPhilippe Mathieu-Daudé * QEMU System Emulator
38d7f2e76SPhilippe Mathieu-Daudé *
48d7f2e76SPhilippe Mathieu-Daudé * Copyright (c) 2003-2020 Fabrice Bellard
58d7f2e76SPhilippe Mathieu-Daudé *
68d7f2e76SPhilippe Mathieu-Daudé * Permission is hereby granted, free of charge, to any person obtaining a copy
78d7f2e76SPhilippe Mathieu-Daudé * of this software and associated documentation files (the "Software"), to deal
88d7f2e76SPhilippe Mathieu-Daudé * in the Software without restriction, including without limitation the rights
98d7f2e76SPhilippe Mathieu-Daudé * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
108d7f2e76SPhilippe Mathieu-Daudé * copies of the Software, and to permit persons to whom the Software is
118d7f2e76SPhilippe Mathieu-Daudé * furnished to do so, subject to the following conditions:
128d7f2e76SPhilippe Mathieu-Daudé *
138d7f2e76SPhilippe Mathieu-Daudé * The above copyright notice and this permission notice shall be included in
148d7f2e76SPhilippe Mathieu-Daudé * all copies or substantial portions of the Software.
158d7f2e76SPhilippe Mathieu-Daudé *
168d7f2e76SPhilippe Mathieu-Daudé * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
178d7f2e76SPhilippe Mathieu-Daudé * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
188d7f2e76SPhilippe Mathieu-Daudé * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
198d7f2e76SPhilippe Mathieu-Daudé * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
208d7f2e76SPhilippe Mathieu-Daudé * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
218d7f2e76SPhilippe Mathieu-Daudé * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
228d7f2e76SPhilippe Mathieu-Daudé * THE SOFTWARE.
238d7f2e76SPhilippe Mathieu-Daudé */
248d7f2e76SPhilippe Mathieu-Daudé
258d7f2e76SPhilippe Mathieu-Daudé #include "qemu/osdep.h"
268d7f2e76SPhilippe Mathieu-Daudé #include "qemu-main.h"
278d7f2e76SPhilippe Mathieu-Daudé #include "sysemu/sysemu.h"
288d7f2e76SPhilippe Mathieu-Daudé
298d7f2e76SPhilippe Mathieu-Daudé #ifdef CONFIG_SDL
308d7f2e76SPhilippe Mathieu-Daudé #include <SDL.h>
318d7f2e76SPhilippe Mathieu-Daudé #endif
328d7f2e76SPhilippe Mathieu-Daudé
qemu_default_main(void)338d7f2e76SPhilippe Mathieu-Daudé int qemu_default_main(void)
348d7f2e76SPhilippe Mathieu-Daudé {
358d7f2e76SPhilippe Mathieu-Daudé int status;
368d7f2e76SPhilippe Mathieu-Daudé
378d7f2e76SPhilippe Mathieu-Daudé status = qemu_main_loop();
38*66bbe3e9SClément Chigot qemu_cleanup(status);
398d7f2e76SPhilippe Mathieu-Daudé
408d7f2e76SPhilippe Mathieu-Daudé return status;
418d7f2e76SPhilippe Mathieu-Daudé }
428d7f2e76SPhilippe Mathieu-Daudé
438d7f2e76SPhilippe Mathieu-Daudé int (*qemu_main)(void) = qemu_default_main;
448d7f2e76SPhilippe Mathieu-Daudé
main(int argc,char ** argv)458d7f2e76SPhilippe Mathieu-Daudé int main(int argc, char **argv)
468d7f2e76SPhilippe Mathieu-Daudé {
478d7f2e76SPhilippe Mathieu-Daudé qemu_init(argc, argv);
488d7f2e76SPhilippe Mathieu-Daudé return qemu_main();
498d7f2e76SPhilippe Mathieu-Daudé }
50