?? build.comake.py
字號:
targets['executables'] = Target( inputs=[ Input('colinux-daemon.exe'), Input('colinux-net-daemon.exe'), Input('colinux-console-fltk.exe'), Input('colinux-debug-daemon.exe'), Input('colinux-console-nt.exe'), Input('colinux-bridged-net-daemon.exe'), Input('colinux-slirp-net-daemon.exe'), Input('colinux-serial-daemon.exe'), Input('linux.sys'), ], tool = Empty(),)def generate_options(compiler_def_type, libs=None, lflags=None): if not libs: libs = [] if not lflags: lflags = [] return Options( overriders = dict( compiler_def_type = compiler_def_type, compiler_strip = True, ), appenders = dict( compiler_flags = [ '-mno-cygwin' ], linker_flags = lflags, compiler_libs = libs + [ 'user32', 'gdi32', 'ws2_32', 'ntdll', 'kernel32', 'ole32', 'uuid', 'gdi32', 'msvcrt', 'crtdll', 'shlwapi', ]), )user_dep = [Input('../user/user-all.a')]user_res = [Input('../user/daemon/res/colinux.res')]daemon_res = [Input('../user/daemon/res/daemon.res')]targets['colinux-daemon.exe'] = Target( inputs = daemon_res + [ Input('../user/daemon/daemon.o'), ] + user_dep, tool = Compiler(), mono_options = generate_options('gcc'),)targets['colinux-net-daemon.exe'] = Target( inputs = user_res + [ Input('../user/conet-daemon/build.a'), Input('../../../user/daemon-base/build.a'), ] + user_dep, tool = Compiler(), mono_options = generate_options('g++'),)targets['colinux-bridged-net-daemon.exe'] = Target( inputs = user_res + [ Input('../user/conet-bridged-daemon/build.o'), ] + user_dep, tool = Compiler(), mono_options = generate_options('gcc', libs=['wpcap']),)targets['colinux-slirp-net-daemon.exe'] = Target( inputs = user_res + [ Input('../user/conet-slirp-daemon/build.o'), Input('../../../user/slirp/build.o'), ] + user_dep, tool = Compiler(), mono_options = generate_options('gcc', libs=['iphlpapi']),)targets['colinux-serial-daemon.exe'] = Target( inputs = user_res + [ Input('../user/coserial-daemon/build.o'), ] + user_dep, tool = Compiler(), mono_options = generate_options('gcc'),)targets['colinux-console-fltk.exe'] = Target( inputs = user_res + [ Input('../user/console/build.a'), Input('../../../user/console/build.a'), ] + user_dep, tool = Compiler(), mono_options = generate_options('g++', libs=['fltk', 'mingw32'], lflags=['-mwindows']),)targets['colinux-console-nt.exe'] = Target( inputs = user_res + [ Input('../user/console-nt/build.a'), Input('../../../user/console-base/build.a'), ] + user_dep, tool = Compiler(), mono_options = generate_options('g++'),)targets['colinux-debug-daemon.exe'] = Target( inputs = user_res + [ Input('../user/debug/build.o'), Input('../../../user/debug/build.o'), ] + user_dep, tool = Compiler(), mono_options = generate_options('gcc'),)targets['driver.o'] = Target( inputs = [ Input('../../../kernel/build.o'), Input('../kernel/build.o'), Input('../../../arch/build.o'), Input('../../../common/common.a'), ], tool = Linker(),)def script_cmdline(scripter, tool_run_inf): inputs = tool_run_inf.target.get_actual_inputs() command_line = (( "%s " "-Wl,--strip-debug " "-Wl,--subsystem,native " "-Wl,--image-base,0x10000 " "-Wl,--file-alignment,0x1000 " "-Wl,--section-alignment,0x1000 " "-Wl,--entry,_DriverEntry@8 " "-Wl,%s " "-mdll -nostartfiles -nostdlib " "-o %s %s -lntoskrnl -lhal -lgcc ") % (scripter.get_cross_build_tool('gcc', tool_run_inf), inputs[1].pathname, tool_run_inf.target.pathname, inputs[0].pathname)) return command_linetargets['linux.sys'] = Target( tool = Script(script_cmdline), inputs = [ Input('driver.o'), Input('driver.base.exp'), ], options = Options( appenders = dict( compiler_defines = dict( __KERNEL__=None, CO_KERNEL=None, CO_HOST_KERNEL=None, ), ) ))def script_cmdline(scripter, tool_run_inf): inputs = tool_run_inf.target.get_actual_inputs() command_line = (( "%s " "--dllname linux.sys " "--base-file %s " "--output-exp %s") % (scripter.get_cross_build_tool('dlltool', tool_run_inf), inputs[0].pathname, tool_run_inf.target.pathname)) return command_linetargets['driver.base.exp'] = Target( tool = Script(script_cmdline), inputs = [ Input('driver.base.tmp'), ],)def script_cmdline(scripter, tool_run_inf): inputs = tool_run_inf.target.get_actual_inputs() command_line = (( "%s " "-Wl,--base-file,%s " "-Wl,--entry,_DriverEntry@8 " "-nostartfiles -nostdlib " "-o junk.tmp %s -lntoskrnl -lhal -lgcc ; " "rm -f junk.tmp") % (scripter.get_cross_build_tool('gcc', tool_run_inf), tool_run_inf.target.pathname, inputs[0].pathname)) return command_linetargets['driver.base.tmp'] = Target( tool = Script(script_cmdline), inputs = [ Input('driver.o'), ],)targets['installer'] = Target( inputs = [ Input('executables'), Input('../user/install/coLinux.exe'), ], tool = Empty(),)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -