diff --git a/CMakeLists.txt b/CMakeLists.txt index c6cd6c3d4dcab0dced15490c85ee0d4b51e6022d..c816ddc0651f2dfbaa5bd5863c6339873aea26de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,13 +125,6 @@ if ((${SRB2_USE_CCACHE}) AND (${CMAKE_C_COMPILER} MATCHES "clang")) message(WARNING "Using clang and CCache: You may want to set environment variable CCACHE_CPP2=yes to prevent include errors during compile.") endif() -# Add sources from Sourcefile -function(target_sourcefile type) - file(STRINGS Sourcefile list - REGEX "[-0-9A-Za-z_]+\.${type}") - target_sources(SRB2SDL2 PRIVATE ${list}) -endfunction() - # bitness check set(SRB2_SYSTEM_BITS 0) if(CMAKE_SIZEOF_VOID_P EQUAL 8) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5b681d042de1121778da36ada21f5c2349016d22..cc04e2cba9d4b5a13d15d19a410d28a201573e14 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,135 @@ -add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32) +add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 + comptime.c + md5.c + config.h.in + string.c + d_main.c + d_clisrv.c + d_net.c + d_netfil.c + d_netcmd.c + dehacked.c + deh_soc.c + deh_lua.c + deh_tables.c + z_zone.c + f_finale.c + f_wipe.c + g_demo.c + g_game.c + g_input.c + g_splitscreen.c + am_map.c + command.c + console.c + font.c + hu_stuff.c + i_time.c + y_inter.c + st_stuff.c + m_aatree.c + m_anigif.c + m_argv.c + m_bbox.c + m_cheat.c + m_cond.c + m_easing.c + m_fixed.c + m_misc.c + m_perfstats.c + m_random.c + m_queue.c + info.c + p_ceilng.c + p_enemy.c + p_floor.c + p_inter.c + p_lights.c + p_map.c + p_maputl.c + p_mobj.c + p_polyobj.c + p_saveg.c + p_setup.c + p_sight.c + p_spec.c + p_telept.c + p_tick.c + p_user.c + p_slopes.c + tables.c + r_bsp.c + r_data.c + r_draw.c + r_fps.c + r_main.c + r_plane.c + r_segs.c + r_skins.c + r_sky.c + r_splats.c + r_things.c + r_bbox.c + r_textures.c + r_patch.c + r_patchrotation.c + r_picformats.c + r_portal.c + screen.c + taglist.c + v_video.c + s_sound.c + sounds.c + w_wad.c + filesrch.c + mserv.c + http-mserv.c + i_tcp.c + lzf.c + vid_copy.s + lua_script.c + lua_baselib.c + lua_mathlib.c + lua_hooklib.c + lua_consolelib.c + lua_infolib.c + lua_mobjlib.c + lua_playerlib.c + lua_skinlib.c + lua_thinkerlib.c + lua_maplib.c + lua_taglib.c + lua_polyobjlib.c + lua_blockmaplib.c + lua_hudlib.c + lua_hudlib_drawlist.c + k_kart.c + k_respawn.c + k_collide.c + k_color.c + k_race.c + k_battle.c + k_pwrlv.c + k_waypoint.c + k_pathfind.c + k_bheap.c + k_bot.c + k_botitem.c + k_botsearch.c + k_grandprix.c + k_boss.c + k_hud.c + k_menudef.c + k_menufunc.c + k_menudraw.c + k_terrain.c + k_brightmap.c + k_terrain.c + k_director.c + k_follower.c + k_profiles.c + k_specialstage.c +) if("${CMAKE_COMPILER_IS_GNUCC}" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows" AND NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}") # On MinGW with internal libraries, link the standard library statically @@ -7,10 +138,6 @@ endif() set_property(TARGET SRB2SDL2 PROPERTY C_STANDARD 11) -# Core sources -target_sourcefile(c) -target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in) - set(SRB2_ASM_SOURCES vid_copy.s) set(SRB2_NASM_SOURCES tmap_mmx.nas tmap.nas) diff --git a/src/Sourcefile b/src/Sourcefile deleted file mode 100644 index f2aa652b1260be5bd93d8af9661e1ce6c3f2a552..0000000000000000000000000000000000000000 --- a/src/Sourcefile +++ /dev/null @@ -1,127 +0,0 @@ -string.c -d_main.c -d_clisrv.c -d_net.c -d_netfil.c -d_netcmd.c -dehacked.c -deh_soc.c -deh_lua.c -deh_tables.c -z_zone.c -f_finale.c -f_wipe.c -g_demo.c -g_game.c -g_input.c -g_splitscreen.c -am_map.c -command.c -console.c -font.c -hu_stuff.c -i_time.c -y_inter.c -st_stuff.c -m_aatree.c -m_anigif.c -m_argv.c -m_bbox.c -m_cheat.c -m_cond.c -m_easing.c -m_fixed.c -m_misc.c -m_perfstats.c -m_random.c -m_queue.c -info.c -p_ceilng.c -p_enemy.c -p_floor.c -p_inter.c -p_lights.c -p_map.c -p_maputl.c -p_mobj.c -p_polyobj.c -p_saveg.c -p_setup.c -p_sight.c -p_spec.c -p_telept.c -p_tick.c -p_user.c -p_slopes.c -tables.c -r_bsp.c -r_data.c -r_draw.c -r_fps.c -r_main.c -r_plane.c -r_segs.c -r_skins.c -r_sky.c -r_splats.c -r_things.c -r_bbox.c -r_textures.c -r_patch.c -r_patchrotation.c -r_picformats.c -r_portal.c -screen.c -taglist.c -v_video.c -s_sound.c -sounds.c -w_wad.c -filesrch.c -mserv.c -http-mserv.c -i_tcp.c -lzf.c -vid_copy.s -lua_script.c -lua_baselib.c -lua_mathlib.c -lua_hooklib.c -lua_consolelib.c -lua_infolib.c -lua_mobjlib.c -lua_playerlib.c -lua_skinlib.c -lua_thinkerlib.c -lua_maplib.c -lua_taglib.c -lua_polyobjlib.c -lua_blockmaplib.c -lua_hudlib.c -lua_hudlib_drawlist.c -k_kart.c -k_respawn.c -k_collide.c -k_color.c -k_race.c -k_battle.c -k_pwrlv.c -k_waypoint.c -k_pathfind.c -k_bheap.c -k_bot.c -k_botitem.c -k_botsearch.c -k_grandprix.c -k_boss.c -k_hud.c -k_menudef.c -k_menufunc.c -k_menudraw.c -k_terrain.c -k_brightmap.c -k_terrain.c -k_director.c -k_follower.c -k_profiles.c -k_specialstage.c diff --git a/src/blua/CMakeLists.txt b/src/blua/CMakeLists.txt index 4e9c67d2f348a8bfed899e4002d25136284b031f..afe03fdc51294303cd98a601af78164969252ec2 100644 --- a/src/blua/CMakeLists.txt +++ b/src/blua/CMakeLists.txt @@ -1 +1,27 @@ -target_sourcefile(c) +target_sources(SRB2SDL2 PRIVATE + lapi.c + lbaselib.c + ldo.c + lfunc.c + linit.c + liolib.c + llex.c + lmem.c + lobject.c + lstate.c + lstrlib.c + ltablib.c + lundump.c + lzio.c + lauxlib.c + lcode.c + ldebug.c + ldump.c + lgc.c + lopcodes.c + lparser.c + lstring.c + ltable.c + ltm.c + lvm.c +) diff --git a/src/blua/Sourcefile b/src/blua/Sourcefile deleted file mode 100644 index f99c89c8dfb8e8b5da643cb2c8625a764e84580d..0000000000000000000000000000000000000000 --- a/src/blua/Sourcefile +++ /dev/null @@ -1,25 +0,0 @@ -lapi.c -lbaselib.c -ldo.c -lfunc.c -linit.c -liolib.c -llex.c -lmem.c -lobject.c -lstate.c -lstrlib.c -ltablib.c -lundump.c -lzio.c -lauxlib.c -lcode.c -ldebug.c -ldump.c -lgc.c -lopcodes.c -lparser.c -lstring.c -ltable.c -ltm.c -lvm.c diff --git a/src/hardware/CMakeLists.txt b/src/hardware/CMakeLists.txt index 4e9c67d2f348a8bfed899e4002d25136284b031f..a0a0f280c9a7af300cb52ce8742742c77475af8f 100644 --- a/src/hardware/CMakeLists.txt +++ b/src/hardware/CMakeLists.txt @@ -1 +1,15 @@ -target_sourcefile(c) +target_sources(SRB2SDL2 PRIVATE + hw_bsp.c + hw_draw.c + hw_light.c + hw_main.c + hw_clip.c + hw_md2.c + hw_cache.c + hw_md2load.c + hw_md3load.c + hw_model.c + u_list.c + hw_batching.c + r_opengl/r_opengl.c +) diff --git a/src/hardware/Sourcefile b/src/hardware/Sourcefile deleted file mode 100644 index 1c05de76cca6d71251023e3e9e7bdde7d8cffaab..0000000000000000000000000000000000000000 --- a/src/hardware/Sourcefile +++ /dev/null @@ -1,13 +0,0 @@ -hw_bsp.c -hw_draw.c -hw_light.c -hw_main.c -hw_clip.c -hw_md2.c -hw_cache.c -hw_md2load.c -hw_md3load.c -hw_model.c -u_list.c -hw_batching.c -r_opengl/r_opengl.c diff --git a/src/objects/CMakeLists.txt b/src/objects/CMakeLists.txt index 4e9c67d2f348a8bfed899e4002d25136284b031f..f02428382ba73b654a2820839eb43a422cbe8af4 100644 --- a/src/objects/CMakeLists.txt +++ b/src/objects/CMakeLists.txt @@ -1 +1,11 @@ -target_sourcefile(c) +target_sources(SRB2SDL2 PRIVATE + hyudoro.c + gardentop.c + shrink.c + item-debris.c + spb.c + manta-ring.c + orbinaut.c + jawz.c + duel-bomb.c +) diff --git a/src/objects/Sourcefile b/src/objects/Sourcefile deleted file mode 100644 index b8cb63b1fb27bde833eee3ddffab7faaea954e28..0000000000000000000000000000000000000000 --- a/src/objects/Sourcefile +++ /dev/null @@ -1,9 +0,0 @@ -hyudoro.c -gardentop.c -shrink.c -item-debris.c -spb.c -manta-ring.c -orbinaut.c -jawz.c -duel-bomb.c diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index dd8d304a4a4537d4ff4302452e79c4a285a1267d..ee9c4cddc05229bc43ae06ff500efb9d4679a103 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -1,12 +1,17 @@ # Declare SDL2 interface sources -target_sources(SRB2SDL2 PRIVATE mixer_sound.c) - -target_sourcefile(c) - -target_sources(SRB2SDL2 PRIVATE ogl_sdl.c) - -target_sources(SRB2SDL2 PRIVATE i_threads.c) +target_sources(SRB2SDL2 PRIVATE + mixer_sound.c + ogl_sdl.c + i_threads.c + i_net.c + i_system.c + i_main.c + i_video.c + dosstr.c + endtxt.c + hwsym_sdl.c +) if(${SRB2_USEASM}) set_source_files_properties(${SRB2_ASM_SOURCES} PROPERTIES LANGUAGE C) diff --git a/src/sdl/Sourcefile b/src/sdl/Sourcefile deleted file mode 100644 index 82d5ce0734eb30684cee1ee875f8e94e481bd5ad..0000000000000000000000000000000000000000 --- a/src/sdl/Sourcefile +++ /dev/null @@ -1,7 +0,0 @@ -i_net.c -i_system.c -i_main.c -i_video.c -dosstr.c -endtxt.c -hwsym_sdl.c