diff --git a/.buckconfig b/.buckconfig new file mode 100644 index 00000000..5d37f70c --- /dev/null +++ b/.buckconfig @@ -0,0 +1,6 @@ +[project] + ignore = .git, .buckd + +[cxx] + untracked_headers = warn + untracked_headers_whitelist = /usr/include/.*, /usr/local/Cellar/llvm/.* diff --git a/.gitignore b/.gitignore index 4415b791..3c7c850f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ libsundown.so* sundown smartypants *.exe + +/.buckd/ +/buck-out/ +/buckaroo/ +.buckconfig.local diff --git a/BUCK b/BUCK new file mode 100644 index 00000000..dfeb9039 --- /dev/null +++ b/BUCK @@ -0,0 +1,15 @@ +cxx_library( + name = 'sundown', + header_namespace = '', + exported_headers = subdir_glob([ + ('src', '**/*.h'), + ('html', '**/*.h'), + ]), + srcs = glob([ + 'src/**/*.c', + 'html/**/*.c', + ]), + visibility = [ + 'PUBLIC', + ], +) diff --git a/README.markdown b/README.markdown index 61736025..ab30535f 100644 --- a/README.markdown +++ b/README.markdown @@ -111,6 +111,22 @@ library, or to build the sample `sundown` executable, which is just a commandlin Markdown to XHTML parser. (If gcc gives you grief about `-fPIC`, e.g. with MinGW, try `make MFLAGS=` instead of just `make`.) +Buck +---- + +`Sundown` can be built using Buck: + +``` +buck build :sundown +``` + +As can the examples: + +``` +buck run //examples/:smartypants +buck run //examples/:sundown +``` + License ------- diff --git a/buckaroo.json b/buckaroo.json new file mode 100644 index 00000000..438ae7c8 --- /dev/null +++ b/buckaroo.json @@ -0,0 +1,3 @@ +{ + "name": "sundown" +} \ No newline at end of file diff --git a/examples/BUCK b/examples/BUCK new file mode 100644 index 00000000..d24c5bb6 --- /dev/null +++ b/examples/BUCK @@ -0,0 +1,19 @@ +cxx_binary( + name = 'smartypants', + srcs = [ + 'smartypants.c', + ], + deps = [ + '//:sundown', + ], +) + +cxx_binary( + name = 'sundown', + srcs = [ + 'sundown.c', + ], + deps = [ + '//:sundown', + ], +)