From 4770b716f103a57e174cdb6e4151f01a3297714b Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 8 Jul 2015 18:05:50 +0800 Subject: add features for README.md --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76e986f11..cb1f8c40a 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,41 @@ The Automatic Cross-platform Build Tool ======================== -xmake is an automatic cross-platform build tool +Xmake is an automatic cross-platform build tool. + + +features +-------- + +1. create c/c++ projects +2. automatically probe the host environment and configure project +3. build and rebuild project +4. clean generated target files +5. package the project targets automatically + - *.ipa for ios + - *.apk for android + - *.pkg for library + - *.app for macosx + - *.exe for windows + - others + + +6. install target to pc or the mobile device +7. run a given target +8. describe the project file using lua script, more flexible and simple + ```lua + + -- xmake.lua + add_target("console") + + -- set kind + set_kind("binary") + + -- add files + add_files("src/*.c") + ``` +9. custom platforms and toolchains +10. custom rules for package/compiler/linker contact ------- @@ -118,3 +152,41 @@ Please see [wiki](https://github.com/waruqi/xmake/wiki) if you want to known mor ``` + +example +------- + +```lua +-- the debug mode +if modes("debug") then + + -- enable the debug symbols + set_symbols("debug") + + -- disable optimization + set_optimize("none") +end + +-- the release mode +if modes("release") then + + -- set the symbols visibility: hidden + set_symbols("hidden") + + -- enable fastest optimization + set_optimize("fastest") + + -- strip all symbols + set_strip("all") +end + +-- add target +add_target("test") + + -- set kind + set_kind("static") + + -- add files + add_files("src/*.c") + +``` -- cgit v1.3.1