Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

C Language Pack

branch: master

Merge pull request #1 from oguzbilgic/patch-1

Fix heroku link on README
latest commit 38bccbfde2
David Dollar ddollar authored
Octocat-spinner-32 bin cleanup October 17, 2011
Octocat-spinner-32 README.md Fix heroku link on README February 04, 2012
README.md

Heroku buildpack: C

This is a Heroku buildpack for C apps. It uses Make.

Usage

Example usage:

$ ls
configure  Makefile  myapp.c

$ heroku create --stack cedar --buildpack http://github.com/heroku/heroku-buildpack-c.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom buildpack
-----> C app detected
-----> Configuring
       Looking for somelibrary… ok
-----> Compiling with Make
       gcc -o myapp myapp.c

The buildpack will detect your app as C if it has the file Makefile in the root. It will run a configure script if it exists in the root of the repository. It will then run make to compile the app.

Hacking

To use this buildpack, fork it on Github. Push up changes to your fork, then create a test app with --buildpack <your-github-url> and push to it.

For example, you can run autogen.sh if it exists.

Open bin/compile in your editor, and add the following lines above the configure step:

if [ -f autogen.sh ]; then
  echo "-----> Running autogen.sh"
  ./autogen.sh 2>&1 | indent
fi

Commit and push the changes to your buildpack to your Github fork, then push your sample app to Heroku to test. You should see:

-----> Running autogen.sh
Something went wrong with that request. Please try again.