diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..4b91604fbb982c57c2034a78174dbfdd24b9571e --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +demo: Makefile demo.c library/zonedetect.c + gcc -o demo demo.c -Wall -Ilibrary library/zonedetect.c -lm diff --git a/README.md b/README.md index 4b4b474c2ec448413b910a1a6dd5f268e408d321..41d2e29cbb4c8f4feca36df17df1f6686e489ccd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a C library that allows you to find an area a point belongs to using a database file. A typical example would be looking up the country or timezone given a latitude and longitude. The timezone database also contains the country information. -The API should be self-explanatory from zonedetect.h. A small demo is included (demo.c) +The API should be self-explanatory from zonedetect.h. A small demo is included (demo.c). You can build the demo with `make demo` and run it like this: `./demo timezone21.bin 35.0715 -82.5216`. The databases are obtained from [here](https://github.com/evansiroky/timezone-boundary-builder) and converted to the format used by this library.