executable('client',
  [
    'Alias.m',
    'Client.m',
    'Command.m',
    'ConsoleLine.m',
    'Cube.m',
    'DynamicEntity.m',
    'Entity.m',
    'Identifier.m',
    'KeyMapping.m',
    'MD2.m',
    'MapModelInfo.m',
    'Menu.m',
    'MenuItem.m',
    'Monster.m',
    'OFString+Cube.m',
    'Player.m',
    'Projectile.m',
    'ResolverResult.m',
    'ResolverThread.m',
    'ServerEntity.m',
    'ServerInfo.m',
    'Variable.m',
    'clients.m',
    'clientextras.m',
    'clientgame.m',
    'clients2c.m',
    'commands.m',
    'console.m',
    'editing.m',
    'entities.m',
    'init.m',
    'menus.m',
    'physics.m',
    'rendercubes.m',
    'renderextras.m',
    'rendergl.m',
    'rendermd2.m',
    'renderparticles.m',
    'rendertext.m',
    'rndmap.m',
    'savegamedemo.m',
    'server.m',
    'serverbrowser.m',
    'serverms.m',
    'serverutil.m',
    'sound.m',
    'tools.m',
    'weapon.m',
    'world.m',
    'worldio.m',
    'worldlight.m',
    'worldocull.m',
    'worldrender.m',
  ],
  dependencies: [
    objfw_dep,
    sdl_dep,
    sdlimage_dep,
    sdlmixer_dep,
    zlib_dep,
    extra_deps
  ],
  include_directories: [enet_includes],
  link_args: client_link_args,
  link_with: [enet],
  win_subsystem: 'windows')

executable('server',
  [
    'Client.m',
    'Entity.m',
    'ServerEntity.m',
    'server.m',
    'serverms.m',
    'serverutil.m',
    'tools.m',
  ],
  objc_args: ['-DSTANDALONE'],
  dependencies: [
    objfw_dep,
    sdl_dep
  ],
  include_directories: [enet_includes],
  link_args: server_link_args,
  link_with: [enet],
  win_subsystem: 'console')
