# generated by mkgen.py: do not edit
MKSHELL=$PLAN9/bin/rc
<config.$SYS

UNITS=\
	rev script_api_script_accounting script_api_script_admin \
	script_api_script_airport script_api_script_asyncmode \
	script_api_script_base script_api_script_basestation \
	script_api_script_bridge script_api_script_bridgelist \
	script_api_script_cargo script_api_script_cargolist \
	script_api_script_cargomonitor script_api_script_client \
	script_api_script_clientlist script_api_script_company \
	script_api_script_companymode script_api_script_controller \
	script_api_script_date script_api_script_depotlist \
	script_api_script_engine script_api_script_enginelist \
	script_api_script_error script_api_script_event \
	script_api_script_event_types script_api_script_execmode \
	script_api_script_game script_api_script_gamesettings \
	script_api_script_goal script_api_script_group \
	script_api_script_grouplist script_api_script_industry \
	script_api_script_industrylist script_api_script_industrytype \
	script_api_script_industrytypelist script_api_script_infrastructure \
	script_api_script_league script_api_script_list script_api_script_log \
	script_api_script_map script_api_script_marine script_api_script_newgrf \
	script_api_script_news script_api_script_object \
	script_api_script_objecttype script_api_script_objecttypelist \
	script_api_script_order script_api_script_priorityqueue \
	script_api_script_rail script_api_script_railtypelist \
	script_api_script_road script_api_script_roadtypelist \
	script_api_script_sign script_api_script_signlist \
	script_api_script_station script_api_script_stationlist \
	script_api_script_story_page script_api_script_storypagelist \
	script_api_script_storypageelementlist script_api_script_subsidy \
	script_api_script_subsidylist script_api_script_testmode \
	script_api_script_text script_api_script_tile \
	script_api_script_tilelist script_api_script_town \
	script_api_script_townlist script_api_script_tunnel \
	script_api_script_vehicle script_api_script_vehiclelist \
	script_api_script_viewport script_api_script_waypoint \
	script_api_script_waypointlist script_api_script_window \
	script_script_config script_script_gui script_script_info \
	script_script_info_dummy script_script_instance script_script_scanner \
	script_squirrel script_squirrel_std strgen_strgen_base \
	3rdparty_fmt_format_cc 3rdparty_fmt_os_cc 3rdparty_md5_md5 \
	3rdparty_monocypher_monocypher_ed25519 3rdparty_monocypher_monocypher \
	3rdparty_squirrel_sqstdlib_sqstdaux \
	3rdparty_squirrel_sqstdlib_sqstdmath 3rdparty_squirrel_squirrel_sqapi \
	3rdparty_squirrel_squirrel_sqbaselib 3rdparty_squirrel_squirrel_sqclass \
	3rdparty_squirrel_squirrel_sqcompiler \
	3rdparty_squirrel_squirrel_sqdebug \
	3rdparty_squirrel_squirrel_sqfuncstate \
	3rdparty_squirrel_squirrel_sqlexer 3rdparty_squirrel_squirrel_sqobject \
	3rdparty_squirrel_squirrel_sqstate 3rdparty_squirrel_squirrel_sqtable \
	3rdparty_squirrel_squirrel_sqvm ai_ai_config ai_ai_core ai_ai_gui \
	ai_ai_info ai_ai_instance ai_ai_scanner blitter_32bpp_anim \
	blitter_32bpp_base blitter_32bpp_optimized blitter_32bpp_simple \
	blitter_8bpp_base blitter_8bpp_optimized blitter_8bpp_simple \
	blitter_null core_geometry_func core_math_func core_pool_func \
	core_random_func core_string_builder core_string_consumer \
	core_string_inplace core_utf8 fontcache_freetypefontcache \
	fontcache_spritefontcache fontcache_truetypefontcache game_game_config \
	game_game_core game_game_gui game_game_info game_game_instance \
	game_game_scanner game_game_text linkgraph_demands linkgraph_flowmapper \
	linkgraph_linkgraph linkgraph_linkgraph_gui linkgraph_linkgraphjob \
	linkgraph_linkgraphschedule linkgraph_mcf linkgraph_refresh \
	misc_dbg_helpers misc_getoptdata misc_history music_midifile \
	music_null_m music_plan9_m network_core_address network_core_config \
	network_core_core network_core_network_game_info network_core_host \
	network_core_os_abstraction network_core_packet network_core_tcp \
	network_core_tcp_admin network_core_tcp_connect \
	network_core_tcp_content network_core_tcp_coordinator \
	network_core_tcp_game network_core_tcp_stun network_core_tcp_turn \
	network_core_udp network_core_http_none network_network \
	network_network_admin network_network_chat_gui network_network_client \
	network_network_command network_network_content \
	network_network_content_gui network_network_coordinator \
	network_network_crypto network_network_gamelist network_network_gui \
	network_network_query network_network_server network_network_stun \
	network_network_survey network_network_turn network_network_udp \
	newgrf_newgrf_act0_aircraft newgrf_newgrf_act0_airports \
	newgrf_newgrf_act0_badges newgrf_newgrf_act0_bridges \
	newgrf_newgrf_act0_canals newgrf_newgrf_act0_cargo \
	newgrf_newgrf_act0_globalvar newgrf_newgrf_act0_houses \
	newgrf_newgrf_act0_industries newgrf_newgrf_act0_objects \
	newgrf_newgrf_act0_railtypes newgrf_newgrf_act0_roadstops \
	newgrf_newgrf_act0_roadtypes newgrf_newgrf_act0_roadvehs \
	newgrf_newgrf_act0_ships newgrf_newgrf_act0_sounds \
	newgrf_newgrf_act0_stations newgrf_newgrf_act0_trains \
	newgrf_newgrf_act0 newgrf_newgrf_act1 newgrf_newgrf_act2 \
	newgrf_newgrf_act3 newgrf_newgrf_act4 newgrf_newgrf_act5 \
	newgrf_newgrf_act6 newgrf_newgrf_act7_9 newgrf_newgrf_act8 \
	newgrf_newgrf_acta newgrf_newgrf_actb newgrf_newgrf_actc \
	newgrf_newgrf_actd newgrf_newgrf_acte newgrf_newgrf_actf \
	newgrf_newgrf_act10 newgrf_newgrf_act11 newgrf_newgrf_act12 \
	newgrf_newgrf_act13 newgrf_newgrf_act14 newgrf_newgrf_bytereader \
	newgrf_newgrf_stringmapping os_unix_crashlog_unix os_unix_survey_unix \
	os_unix_library_loader_unix os_unix_unix pathfinder_yapf_yapf_rail \
	pathfinder_yapf_yapf_river_builder pathfinder_yapf_yapf_road \
	pathfinder_yapf_yapf_ship pathfinder_yapf_yapf_ship_regions \
	pathfinder_water_regions saveload_afterload saveload_ai_sl \
	saveload_airport_sl saveload_animated_tile_sl saveload_autoreplace_sl \
	saveload_cargomonitor_sl saveload_cargopacket_sl saveload_cheat_sl \
	saveload_company_sl saveload_depot_sl saveload_economy_sl \
	saveload_engine_sl saveload_game_sl saveload_gamelog_sl \
	saveload_goal_sl saveload_group_sl saveload_industry_sl \
	saveload_labelmaps_sl saveload_league_sl saveload_linkgraph_sl \
	saveload_map_sl saveload_misc_sl saveload_newgrf_sl saveload_object_sl \
	saveload_oldloader saveload_oldloader_sl saveload_order_sl \
	saveload_randomizer_sl saveload_saveload saveload_settings_sl \
	saveload_signs_sl saveload_station_sl saveload_storage_sl \
	saveload_strings_sl saveload_story_sl saveload_subsidy_sl \
	saveload_town_sl saveload_vehicle_sl saveload_waypoint_sl \
	saveload_water_regions_sl sound_null_s sound_plan9_s spriteloader_grf \
	spriteloader_makeindexed spriteloader_sprite_file \
	timer_timer_game_common timer_timer_game_calendar \
	timer_timer_game_economy timer_timer_game_realtime \
	timer_timer_game_tick timer_timer_window video_plan9_v \
	video_dedicated_v video_null_v video_video_driver aircraft_cmd \
	aircraft_gui airport airport_gui animated_tile articulated_vehicles \
	autocompletion autoreplace autoreplace_cmd autoreplace_gui base_consist \
	bmp bootstrap_gui bridge_gui bridge_map build_vehicle_gui cachecheck \
	cargoaction cargomonitor cargopacket cargotype cheat cheat_gui \
	clear_cmd command company_cmd company_gui console console_cmds \
	console_gui cpu crashlog currency date_gui debug dedicated depot \
	depot_cmd depot_gui disaster_vehicle dock_gui driver dropdown economy \
	effectvehicle elrail engine engine_gui error error_gui fileio fios \
	fios_gui fontcache framerate_gui gamelog genworld genworld_gui gfx \
	gfx_layout gfx_layout_fallback gfxinit goal goal_gui graph_gui \
	ground_vehicle group_cmd group_gui heightmap help_gui highscore \
	highscore_gui hotkeys industry_cmd industry_gui ini ini_load intro_gui \
	landscape league_cmd league_gui main_gui map misc misc_cmd misc_gui \
	mixer music music_gui newgrf newgrf_airport newgrf_airporttiles \
	newgrf_badge newgrf_badge_config newgrf_badge_gui newgrf_canal \
	newgrf_cargo newgrf_commons newgrf_config newgrf_debug_gui \
	newgrf_engine newgrf_generic newgrf_gui newgrf_house newgrf_industries \
	newgrf_industrytiles newgrf_object newgrf_profiling newgrf_railtype \
	newgrf_roadstop newgrf_roadtype newgrf_sound newgrf_spritegroup \
	newgrf_station newgrf_storage newgrf_text newgrf_town newgrf_townname \
	news_gui object_cmd object_gui openttd order_backup order_cmd order_gui \
	osk_gui palette pbs picker_gui progress rail rail_cmd rail_gui \
	random_access_file road road_cmd road_gui road_map roadstop roadveh_cmd \
	roadveh_gui screenshot_bmp screenshot_gui screenshot screenshot_pcx \
	settingentry_gui settings settings_gui settings_table ship_cmd ship_gui \
	signal signature signs signs_cmd signs_gui slider smallmap_gui \
	social_integration sound soundloader soundloader_raw soundloader_wav \
	sprite spritecache station station_cmd station_gui statusbar_gui story \
	story_gui string stringfilter strings subsidy subsidy_gui survey \
	terraform_cmd terraform_gui textbuf texteff textfile_gui tgp tile_map \
	tilearea timetable_cmd timetable_gui toolbar_gui town_cmd town_gui \
	townname train_cmd train_gui transparency_gui tree_cmd tree_gui \
	tunnel_map tunnelbridge_cmd vehicle vehicle_cmd vehicle_gui vehiclelist \
	viewport viewport_gui void_cmd water_cmd waypoint waypoint_cmd \
	waypoint_gui widget window os_unix_unix_main zlib_adler32 zlib_compress \
	zlib_crc32 zlib_deflate zlib_gzclose zlib_gzlib zlib_gzread \
	zlib_gzwrite zlib_infback zlib_inffast zlib_inflate zlib_inftrees \
	zlib_trees zlib_uncompr zlib_zutil lzma_common_tuklib_physmem \
	lzma_liblzma_check_check lzma_liblzma_common_block_util \
	lzma_liblzma_common_common lzma_liblzma_common_easy_preset \
	lzma_liblzma_common_filter_common lzma_liblzma_common_hardware_physmem \
	lzma_liblzma_common_index lzma_liblzma_common_stream_flags_common \
	lzma_liblzma_common_string_conversion lzma_liblzma_common_vli_size \
	lzma_liblzma_check_crc32_fast lzma_liblzma_check_crc64_fast \
	lzma_liblzma_check_sha256 lzma_liblzma_common_alone_encoder \
	lzma_liblzma_common_block_buffer_encoder \
	lzma_liblzma_common_block_encoder \
	lzma_liblzma_common_block_header_encoder \
	lzma_liblzma_common_easy_buffer_encoder \
	lzma_liblzma_common_easy_encoder \
	lzma_liblzma_common_easy_encoder_memusage \
	lzma_liblzma_common_filter_buffer_encoder \
	lzma_liblzma_common_filter_encoder \
	lzma_liblzma_common_filter_flags_encoder \
	lzma_liblzma_common_index_encoder \
	lzma_liblzma_common_stream_buffer_encoder \
	lzma_liblzma_common_stream_encoder \
	lzma_liblzma_common_stream_flags_encoder \
	lzma_liblzma_common_vli_encoder lzma_liblzma_lzma_lzma_encoder \
	lzma_liblzma_lzma_lzma_encoder_optimum_fast \
	lzma_liblzma_lzma_lzma_encoder_optimum_normal \
	lzma_liblzma_lz_lz_encoder lzma_liblzma_lz_lz_encoder_mf \
	lzma_liblzma_rangecoder_price_table lzma_liblzma_lzma_fastpos_table \
	lzma_liblzma_lzma_lzma2_encoder lzma_liblzma_common_alone_decoder \
	lzma_liblzma_common_auto_decoder \
	lzma_liblzma_common_block_buffer_decoder \
	lzma_liblzma_common_block_decoder \
	lzma_liblzma_common_block_header_decoder \
	lzma_liblzma_common_easy_decoder_memusage lzma_liblzma_common_file_info \
	lzma_liblzma_common_filter_buffer_decoder \
	lzma_liblzma_common_filter_decoder \
	lzma_liblzma_common_filter_flags_decoder \
	lzma_liblzma_common_index_decoder lzma_liblzma_common_index_hash \
	lzma_liblzma_common_stream_buffer_decoder \
	lzma_liblzma_common_stream_decoder \
	lzma_liblzma_common_stream_flags_decoder \
	lzma_liblzma_common_vli_decoder lzma_liblzma_lzma_lzma_decoder \
	lzma_liblzma_lz_lz_decoder lzma_liblzma_lzma_lzma2_decoder \
	lzma_liblzma_lzma_lzma_encoder_presets lib_abi_private_typeinfo \
	lib_abi_stdlib_exception lib_abi_stdlib_stdexcept \
	lib_abi_stdlib_typeinfo lib_cxx_algorithm lib_cxx_chrono \
	lib_cxx_condition_variable lib_cxx_condition_variable_destructor \
	lib_cxx_directory_iterator lib_cxx_hash lib_cxx_ios \
	lib_cxx_ios.instantiations lib_cxx_iostream lib_cxx_locale \
	lib_cxx_memory lib_cxx_mutex lib_cxx_operations lib_cxx_optional \
	lib_cxx_path lib_cxx_regex lib_cxx_stdexcept lib_cxx_string \
	lib_cxx_system_error lib_cxx_thread lib_cxx_variant lib_eh_match \
	lib_cxx_filesystem_error lib_cxx_future invoke ctors

RTHDR=$P0/eh/eh_rt.h $P0/plan9/thread.h $P0/plan9/net.h $P0/plan9/p9audio.h $P0/plan9/p9draw.h

$OBJ/$O.$TARG: ${UNITS:%=$OBJ/%.$O} ${RUNTIME:%=$OBJ/%.$O}
	$LD $LDFLAGS -o $target `{for(n in `{cat units.link} $RUNTIME) echo $OBJ/$n.$O} $LIBS

$OBJ/invoke.$O: invoke.c
	$CC $RTCFLAGS -o $target invoke.c

${RUNTIME:%=$OBJ/%.$O} $OBJ/invoke.$O: $RTHDR

$OBJ/%.$O: %.c
	$CC $CFLAGS -o $target $stem.c

$OBJ/%.$O: $P0/plan9/%.c
	$CC $RTCFLAGS -o $target $P0/plan9/$stem.c

$OBJ/%.$O: $P0/eh/%.c
	$CC $RTCFLAGS -o $target $P0/eh/$stem.c

$OBJ/%.$O: $P0/%.c
	$CC $RTCFLAGS -o $target $P0/$stem.c

<rules.$SYS
