Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement/buck-build #160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[project]
ignore = .git, .buckd

[cxx]
untracked_headers = warn
untracked_headers_whitelist = /usr/include/.*, /usr/local/Cellar/llvm/.*
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ libsundown.so*
sundown
smartypants
*.exe

/.buckd/
/buck-out/
/buckaroo/
.buckconfig.local
15 changes: 15 additions & 0 deletions BUCK
Original file line number Diff line number Diff line change
@@ -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',
],
)
16 changes: 16 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------

Expand Down
3 changes: 3 additions & 0 deletions buckaroo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "sundown"
}
19 changes: 19 additions & 0 deletions examples/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cxx_binary(
name = 'smartypants',
srcs = [
'smartypants.c',
],
deps = [
'//:sundown',
],
)

cxx_binary(
name = 'sundown',
srcs = [
'sundown.c',
],
deps = [
'//:sundown',
],
)