📄 makefile.nmk
字号:
#### System variables.ifdef unix exe_ext= obj_ext=.o cmd_del=rm cmd_echo=echo cmd_cp=cp cmd_install=install.elifdef dos exe_ext=.exe obj_ext=.obj cmd_del=del cmd_echo=echo cmd_cp=copy cmd_install=copy.elifdef win exe_ext=.exe obj_ext=.obj cmd_del=del cmd_echo=echo cmd_cp=copy cmd_install=copy.else echo "usage : make -D system -D compiler [-D DEBUG] " echo "system = unix, dos, win" echo "compiler = gnu, borland, microsoft".endif### Compiler.ifdef gnu cc=g++ c_flags=-x c++ -DSTRLWR c_output=-o c_compile_only=-c c_debug_flags=-g c_nodebug_flags=-O2 -s c_libs=-static.elifdef borland .ifdef dos cc=bcc c_flags=-ml -P .elifdef win cc=bc32 c_flags=-WC .else echo bcc error .endif c_output=-o c_compile_only=-c c_debug_flags=-v c_nodebug_flags=-G c_libs=.elifdef microsoft cc=cl c_flags= c_output=-o c_compile_only=-c c_debug_flags= c_nodebug_flags= c_libs=.else echo "usage : make -D system -D compiler [-D DEBUG] " echo "system = unix, dos, win" echo "compiler = gnu, borland, microsoft".endif### debug.ifdef DEBUG c_flags=$(c_flags) $(c_debug_flags).else c_flags=$(c_flags) $(c_nodebug_flags).endif## Ready for the real script#install_dir=/usr/local/liball: d2u$(exe_ext) u2d$(exe_ext) mksmall$(exe_ext)clean: $(cmd_del) d2u$(exe_ext) u2d$(exe_ext) mksmall$(exe_ext)d2u$(exe_ext): d2u.cpp $(cc) $(c_flags) d2u.cpp $(c_output) d2u$(exe_ext) $(c_libs)u2d$(exe_ext): u2d.cpp $(cc) $(c_flags) u2d.cpp $(c_output) u2d$(exe_ext) $(c_libs)mksmall$(exe_ext): mksmall.cpp $(cc) $(c_flags) mksmall.cpp $(c_output) mksmall$(exe_ext) $(c_libs)zip: $(cmd_del) zip.zip zip zip * install: $(cmd_install) d2u $(install_dir) $(cmd_install) u2d $(install_dir) $(cmd_install) mksmall $(install_dir)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -